Re: Formatting XML

"Oliver Hirschi" <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
"Rolf" <[email protected]> schrieb im Newsbeitrag 
news:[email protected]...
> Hi Oliver....
>
> Raw format is intended to output the file in the same format as it 
> was imported.... so, if you raw format output a file that was pretty 
> to start with, it will be unchanged.
>
> Perhaps you are looking for Format.getCompactFormat().
>
> I just wrote a small test program, and ran it against a file that has 
> an uncommon format. I can confirm that getPrettyFormat() makes it 
> pretty, getRawFormat leaves u unchanged, and getCompactFormat makes 
> it all on one line....

Hi Rolf

I found the mistake:
There was a xml:space="preserve" attribute in the root-element...
After removing this it works well!

Thanks & Regards,
Oliver Hirschi 


_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.