[jdom-interest] Not sure what I'm doing wrong...
arosen at silverstream.com
Tue Oct 2 07:53:12 PDT 2001
Have you seen the JavaDoc for XMLOutputter.setLineSeparator()? Most
importantly, this warning:
"Note that this only applies to newlines generated by the outputter. If you
parse an XML document that contains newlines embedded inside a text node,
and you do not call setTextNormalize, then the newlines will be output
verbatim, as "\n" which is how parsers normalize them."
The XML spec says that all newlines are reported to JDOM as "\n", so that's
probably what's happening. I guess you have to traverse the document and
convert any "\n" you see to the appropriate line separator for your
More information about the jdom-interest