[jdom-interest] RE: Whitespace

Jeremy Whitlock jwhitlock at starprecision.com
Tue Jan 20 08:32:50 PST 2004

	Want to know how I fixed it?  I used all the same code BUT I
added outputter.setTextNormalize(true); before outputting and it fixed
everything.  :)  Laters, Jeremy

-----Original Message-----
From: Ian Lea [mailto:ian at digimem.net] 
Sent: Tuesday, January 20, 2004 9:28 AM
To: Jeremy Whitlock
Subject: RE: [jdom-interest] RE: Whitespace

Didn't someone suggest replacing 

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

with just new XMLOutputter() or something similar?  Your source
still has the former.

ian at digimem.net

> jwhitlock at starprecision.com (Jeremy Whitlock) wrote 
> Elliotte,
> 	I agree that something is up but no matter what text editor I
> open it with, the extra lines are there.  Here are some links of
> interest with my XML before and after and the source that is reading
> in and then directly saving it out:
> http://www.hellaweb.com/hellabot/286
> http://www.hellaweb.com/hellabot/287
> http://www.hellaweb.com/hellabot/288
> I also have a picture of what an XML Editor sees when I load the saved
> XML into it:
> I have tried many different approaches but to no avail.  Take a look
> the links and let me know what route to go next.  Thanks, Jeremy
> -----Original Message-----
> From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]
> On Behalf Of Elliotte Rusty Harold
> Sent: Tuesday, January 20, 2004 8:16 AM
> To: Jeremy Whitlock
> Cc: jdom-interest at jdom.org
> Subject: RE: [jdom-interest] RE: Whitespace
> I suspect you have a line ending issue here involving the difference 
> between linefeeds, and carriage return linefeed pairs or some such. 
> Can you look at the output byte-by-byte? That is, do not translate it 
> into text.  When you say you have two line endings, how are they 
> actually represented?
> This may well be a case where the texxt editor or other tool you're 
> using to view the output is misinforming about what's really there.
> -- 
>    Elliotte Rusty Harold
>    elharo at metalab.unc.edu
>    Effective XML (Addison-Wesley, 2003)
>    http://www.cafeconleche.org/books/effectivexml
> itA
> _______________________________________________
> To control your jdom-interest membership:
> rhost.com
> _______________________________________________
> To control your jdom-interest membership:
Searchable personal storage and archiving from http://www.digimem.net/

More information about the jdom-interest mailing list