This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android 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 contains on how to do this.
Nupur Khanna

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

The link helped a lot!
jQuery in Action, 3rd edition
subject: XSL tag specification using Java (jdom)
It's not a secret anymore!