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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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
Author

XSL tag specification using Java (jdom)

Nupur Khanna
Greenhorn

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
Greenhorn

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

The link helped a lot!
 
 
subject: XSL tag specification using Java (jdom)