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

Jason Hunter jhunter at servlets.com
Sun May 4 22:32:21 PDT 2003


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-

Abe Mishler wrote:
> 
> I did truncate after <b:c> at the bottom (way at the bottom) due to the
> incredible length of the file (it grew from 142kb to over 184kb solely due
> to inexplicable added whitespace.) Other files were trippling in size. I
> thought I had included just enough of the file to show the problem I was
> facing; my apologies for any confusion.
> 
> The problem has been solved with the addition of calling
> setTextNormalize(true). I'm somewhat embarrassed I didn't think of that on
> my own; I am curious as to what changes were made between versions 8 and 9
> that in effect mandates this additional call to generate "normal" files
> (the absence of it in 8 didn't explode my files.) Does this place JDOM in
> stricter compliance with xml generation somehow? That doesn't seem quite
> right. Perhaps a ... bug? ... that would seem more logical. *Shrug*, in any
> case my files are slim and trim again, w00t!
> 
> Thanks for such fast responses from all who replied,
> Abe Mishler
> White Beach Studios, USA
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list