[jdom-interest] newbie - help with document level comments

Frank Walinsky fwalinsky at extol.com
Mon May 14 12:02:41 PDT 2001

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 - "root.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.

More information about the jdom-interest mailing list