[jdom-interest] Re: Hard-Coded Newlines

Joseph Bowbeer jozart at csi.com
Thu Feb 22 19:55:12 PST 2001

Adding a property to XMLOutputter for controlling the newline(s) after the
xml declaration should solve this.

As you point out, this configuration needs to be separate from any element
content formatting options, since one affects content and the other doesn't.

By the way, I like having a newline or two by default, as in b6.

----- original message -----

From: Jason Hunter jhunter at collab.net
Date: Thu, 22 Feb 2001 11:07:06 -0800

Lincoln.J.Carlton at WellsFargo.COM wrote:
> I am creating a string of XML from a Document using the
> XMLOutputter class. I have set newlines false, yet see two
> newlines in my output string, one after the declaration and
> one at the end of the xml-string.

OK, this was added between b5 and b6. [...] We can't know exactly how the
whitespace outside the element structure looks, but we guess that you didn't
put the root element on the first line and thus add a new line.  :-)

More information about the jdom-interest mailing list