[jdom-interest] adding comments to a document object with on seperate lines

Will Luxton will_luxton at yahoo.com
Thu Oct 28 08:49:43 PDT 2004


Hi all,

my program is modifying existing schema objects, and
needs to preserve spacing in the outputted document so
that it matches the parsed input document - for this
reason I use Format.getRawFormat(). So far so good.
However I now need to add a number of comments to the
document object (outside of the root element), and
these all appear on the same line. I cannot add a
newline marker through adding a Text object to the
document - so that fudge is out.

Outside of changing the format for the outputter to
Format.getPrettyFormat(), which will change the
spacing etc of the outputted document, is there any
way I can  get each of the comments to appear on
seperate lines?

cheers

Will

Send instant messages to your online friends http://uk.messenger.yahoo.com 


More information about the jdom-interest mailing list