Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

Re: [jdom-interest] bug: JDOM 1.0 XMLOutputter.outputString() --
 trailing 0A character

Jason Hunter

2005-11-29

Replies:

The pretty formatter prints a newline at the end of output. When
printed to a console or file this is "prettier". :)

-jh-

William Krick wrote:

> I have a jdom document object built dynamically by my application.
>
> When I use XMLOutputter.outputString() to convert the document to a string,
> the resulting string ends with an extra trailing 0A character. This appears
> to be a bug.
>
> Here's what the code looks like...
>
> XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
> String s = outputter.outputString(doc);
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.362 / Virus Database: 267.13.10/188 - Release Date: 11/29/2005
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
>
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.