wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes XSL tag specification using Java (jdom) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL tag specification using Java (jdom)" Watch "XSL tag specification using Java (jdom)" New topic

XSL tag specification using Java (jdom)

Nupur Khanna

Joined: May 18, 2006
Posts: 4
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

Joined: May 24, 2003
Posts: 425
<?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

Joined: May 18, 2006
Posts: 4
Thanks a million.

The link helped a lot!
I agree. Here's the link: http://aspose.com/file-tools
subject: XSL tag specification using Java (jdom)