[jdom-interest] XMLOutputter problem
jhunter at servlets.com
Fri Feb 8 13:50:52 PST 2002
The sometimes-extra-lines was a known issue in b7 (see the TODO from
back then) but it's fixed in the latest CVS.
"Robertson, Jason" wrote:
> If I'm to make an assumption about Alex's problem, there are meaningless
> blank lines added to the document when it's saved. I think he wants the
> newlines and the indent because he wants it to be pretty for a human. I have
> the same problem but didn't care enough to ask about it. In my app, I have a
> little class to merge several web.xml files and I get output like this:
> <!-- A Comment -->
> See the blank lines occurring before the close tag? I think that's what he's
> talking about. If he's not, then hey, anyone know how to solve this problem?
> I'm using b7 and haven't tried pulling the latest code.
> -----Original Message-----
> From: Jason Hunter [mailto:jhunter at servlets.com]
> Sent: Friday, February 08, 2002 3:59 PM
> To: Alex Devasia
> Cc: 'jdom-interest at jdom.org'
> Subject: Re: [jdom-interest] XMLOutputter problem
> Your passing "true" indicates you want newlines added. Don't pass
> true. You probably don't want to pass " " for the indent either. Just
> use the default XMLOutputter constructor.
> Alex Devasia wrote:
> > I notice blank lines get inserted between lines each time I edit an XML
> > file. The class is constructed as follows:
> > m_xmlOutputter = new XMLOutputter(" ", true);
> > I don't want to call m_xmlOutputter.setTextNormalize(true) because it
> > removes whitespace from actual values being written to the file. I just
> > to prevent blank lines from being written to the file. Can I fix this
> > problem by calling some other method. I hope this gets fixed in version 8.
> > Thanks
> > _______________________________________________
> > To control your jdom-interest membership:
> To control your jdom-interest membership:
More information about the jdom-interest