[jdom-interest] XMLOutputter and newlines after declaration/doctype

Jason Hunter jhunter at servlets.com
Sat Dec 28 01:23:55 PST 2002

> I think Vadim is right. XMLOutputter#printDocType (and other methods)
> should respect the newLines flag. If I parse the document

The problem is that with SAXBuilder (because of SAX) we get zero
information about whitespace outside the root element, so we just assume
in all cases that there are newlines between the items.  The normal
output style of not adding newlines is what people generally want
because it usually results in an identical round trip, but if we had
that flag also affect the early portions of the doc, then people would
be upset at seeing a funny output style and would want to turn on
newlines to get the early portions looking good and would be upset when
the newlines showed up in element content.


More information about the jdom-interest mailing list