> Kevin here is the details of what we use to format the XML…
> This is the class we use to format the XML:
>
> http://www.jdom.org/docs/apidocs.1.1/org/jdom/output/Format.html
>
> and the code is as follows:
>
> XMLOutputter tOut = new XMLOutputter(Format.getPrettyFormat());
The web page you quote above says this:
"Typical users can use the standard format configurations obtained by getRawFormat() (no whitespace changes), getPrettyFormat() (whitespace beautification), and getCompactFormat() (whitespace normalisation).”
More specifically:
"getPrettyFormat() (whitespace beautification)"
So I would guess it is your use of getPrettyFormat() that is removing your whitespace. getRawFormat() says
there are no whitespace changes. But I’m guessing that in some places you want whitespace “beautifying"
and in others you want it preserving…
Try changing your code to use getRawFormat() and see if it resolves this issue and can live with
any other issues it might create.
Ashley.
--
Ashley Sanders [log in to unmask]
http://copac.ac.uk -- A Mimas service funded by JISC at the University of Manchester
|