[jdom-interest] XMLFormatter

Srinivasan Pillai spillai3 at csc.com
Wed Apr 14 05:33:14 PDT 2004




Hi,

I am using XMLFormatter to beautify the xml file.

XMLOutputter outputter = new XMLOutputter("", true);

When the code creates a new file it works well. It creates new lines and
the xml looks ok. But if I update the same file, it creates spaces between
certain elements for example:

This is the file I created the first time

<codes>
<code de="1109">
<keys>
<key>1234</key>
<...>
</keys>
</code>
</codes>

When I update the above file:

<codes>

<code de="1109">

<keys>
<key>1234</key>
<...>
</keys>

</code>

</codes>

The space keeps increasing as the number of times I update the file. Can
someone guide me with the proper action I should be taking to resolve this
?

Thanks,
Srini


----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------





More information about the jdom-interest mailing list