CorcosI at BanqueLaurentienne.ca
Tue Feb 27 06:17:52 PST 2001
I guess there is a mistake in "Java and XML" by Brett McLaughlin or maybe
this was the default in the version of JDOM Brett refers to in his book.
Thanks for the info Steven.
From: Steven Gould [mailto:steven.gould at cgiusa.com]
Sent: Tuesday, February 27, 2001 4:42 AM
To: jdom-interest at jdom.org
Subject: Re: [jdom-interest] XMLOutputter
The default XMLOutputter does not add any indentation or newlines, so the
got are correct. The javadoc for the XMLOutputter default constructor
This will create an XMLOutputter with no additional whitespace (indent or
Corcos Igal wrote:
> Has anyone used the XMLOutputter class without specifying any parameters
> found that the supposed default options are not enforced.?
> When I specify the following:
> Document newDoc = new Document( elmRoot );
> XMLOutputter fmt = new XMLOutputter();
> fmt.output(newDoc, System.out);
> My XML gets output all on one line, but when I change the second to last
> line to:
> XMLOutputter fmt = new XMLOutputter(" ", true);
> My XML gets output with the correct formatting (i.e. 2 space indent and
> line feeds on).
> Shouldn't it print this way without having to specify the parameters?
> Igal Corcos.
> To control your jdom-interest membership:
To control your jdom-interest membership:
More information about the jdom-interest