[jdom-interest] Re: bloated RC2 files - extra white space

michael.baehr at multivisual.de michael.baehr at multivisual.de
Mon May 5 11:12:28 PDT 2003


Well, our application uses white space in Text elements, also at the end 
of the element. Normalizing/trimming will definitely break it. We have 
thousands of such documents in several databases!

I wrote my own XMLOutputter for an older jdom version, than deleted it as 
it worked fine in b8 (and a version I got from the CVS a couple of weeks 
ago to fix the StringBuffer problem). Now I get bloated files again :-((

I think there should be settings so one gets out of XMLOutputter exactly 
what was parsed in before.

Will have a look at the changes!

Michael Baehr

> Jason Hunter wrote:
> 
> I'm glad things worked out for you.  I think b8 had some issues where it
> trimmed a little more than it really "should" have, and your code
> probably benefited from that.
> 
> If you want to try something interesting, get the CVS code and use the
> new Format feature:
> 
> new XMLOutputter(Format.getPrettyFormat())
> 
> It should work nicely without you having to call set methods. 
> 
> Hmm, I did set the "pretty" filter to just do text trimming and not text
> normalizing.  I wonder if we should do normalizing instead?  The
> downside is it'll probably be slower, although I have no benchmarks to
> know if it's significant.
> 
> -jh-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030505/2f85afcf/attachment.htm


More information about the jdom-interest mailing list