[jdom-interest] JavaDoc improvement for Format.html?

Klotz, Leigh Leigh.Klotz at xerox.com
Mon Mar 27 09:58:32 PST 2006


Janek,
I found the same thing.  I think that the documentation refers to a
pre-1.0 release.  

Here is a link to my previous message:
http://www.jdom.org/pipermail/jdom-interest/2006-March/015207.html

I found that if you want to serialize a document and have it be
unchanged when parsed (not have it grow newlines or 
) you need to
do this:

   public String testSerializeDocument(Document document) {
      XMLOutputter outputter = null;
      Format format = Format.getRawFormat();
      format.setLineSeparator("\n");
      return XMLOutputter(format).outputString(document);
    } 

If there's a better way, or I don't understand, please let me know.

Leigh.


-----Original Message-----
From: jdom-interest-bounces at jdom.org
[mailto:jdom-interest-bounces at jdom.org] On Behalf Of Janek Bogucki
Sent: Monday, March 27, 2006 4:03 AM
To: jdom-interest at jdom.org
Subject: [jdom-interest] JavaDoc improvement for Format.html?

Hi,

On http://www.jdom.org/docs/apidocs/org/jdom/output/Format.html the
documentation for #setLineSeparator says

'Note that if the "newlines" property is false, this value is
irrelevant'

I cannot find either "setNewlines" or "getNewlines". Have I missed
something or could the documentation be clarified?

Cheers,
-Janek Bogucki



More information about the jdom-interest mailing list