[jdom-interest] newbie - help with document level comments (TYPO in orginal message)

Frank Walinsky fwalinsky at extol.com
Mon May 14 12:58:43 PDT 2001


Sorry, but I had a typo in the original message- "root.addContent(..."
should have been - "xmlDoc.addContent(.....

I'm creating an XML document using the Beta 6 release.  I create the
document with - "Document xmlDoc = new Document(root);"
Interspersed with adding elements to the "root" and children to these
elements, I add comments at the document level with - "xmlDoc.addContent(new
Comment("doc level comment"));.  When the process finishes all the document
level comments appear at the end of the file.   I want the comments to
appear at the beginning of the document before the "root" element.  Is this
possible?  I haven't figured out any way to do it.   Thanks in advance for
any help.
Frank






More information about the jdom-interest mailing list