[jdom-interest] Saving Formatted XML preserving whitespaces ?

Vikas Mane vikas at kenati.com
Sun Aug 15 23:30:27 PDT 2004

Hi Geeks

I am using Format.getPrettyFormat() with  format.setIndent("   ")  to
save the XML.

Using the above method doesnt allow to preserve the whitespaces between
the Elements,
Eg  : <MyText>         hi              </MyText>
Jdom trims the whitespaces . 

On using the  Format.TextMode.PRESERVE , the xml is not saved in proper

Can any buddy suggest some way to save xml in proper format ( preserving
white spaces).


Vikas Mane
Kenati Technologies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20040816/7581cfee/attachment.htm

More information about the jdom-interest mailing list