[jdom-interest] XMLOutputter PI and formatting problem...

Brett McLaughlin brett at newInstance.com
Tue Aug 14 14:34:53 PDT 2001

<<<< Begin message
I know I can use XMLOutputter.setTextNormalize(true). This cures the new
line problem, but introduces another problem. If a have 2 entities seperated
by a space e.g. "hell&ouml; &uuml;brella" (hellö ümbrella), the space will
get trimmed.

Also, new lines are not introduced when the element content is just a String
or CDATA but new lines are introduced for other combinations containing
Strings. e.g :

<element>hello world</element>  ---> this is ok

<element>hello w&ouml;rld</element> ---> the text starts on new lines
                                         (as well as the entity) and becomes


>>>>> End message

I've recently added some patches from Alex Chaffee to XMLOutputter... can
you try this again now and see if there is a different result?

Brett McLaughlin
Enhydra Strategist   http://www.enhydra.org
Lutris Technologies http://www.lutris.com
O'Reilly Author         http://www.oreilly.com/catalog/javaxml2

More information about the jdom-interest mailing list