Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSL tag specification using Java (jdom)

 
Nupur Khanna
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have generated an xml using java code via jdom support(using org.jdom.* package).
I got to specify the xsl file that is associated with my xml.

I found a way to specify my dtd file but am not able to find a way to write the below written line in my xml file:

<?xml-stylesheet type="text/xsl" href="xmlTree.xsl"?>
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<?xml-stylesheet ...?>

is a ProcessingInstruction. I haven't worked on JDOM but any XML generator should allow to set the processing instruction. A simple google search result http://www.javaworld.com/javaworld/jw-07-2000/jw-0728-jdom2-p4.html contains on how to do this.
 
Nupur Khanna
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a million.

The link helped a lot!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic