I'm experiancing the following situation and I don't know if it is this way on purpose or not.
1. I use the DocumentHelper to get an instance of Document - let's call it 'doc'. 2. I add a comment to 'doc' using the following method: doc.addComment("Some comment"); 3. I set the root element: doc.setRootElement(rootElement); - rootElement being an Element instance created by DocumentHelper. I use an instance of XMLWriter (called 'writer') to output the XML (I'm using the prettyPrint of OutputFormat). 4. writer.write(doc); The output xml does not include the comment. However, if I set the root element before adding the comment, the comment will appear at the end of the XML document. Is there anyway to sequence the order in which the document's comments appear in relation to the root element? I'd like the comment to appear before the root element in the resulting xml. I could not find anything in the archives addressing a question of this nature; if there is one, please direct me to that message. Regards, Jeff ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Gadgets, caffeine, t-shirts, fun stuff. http://thinkgeek.com/sf _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user