[jdom-interest] XMLoutputter

Phill_Perryman at Mitel.COM Phill_Perryman at Mitel.COM
Fri Feb 6 11:51:25 PST 2004


Thanks, on closer inspection I noticed a setFormat so

> Format format = getCompactFormat();
> XMLOutputter o = new XMLOutputter(format);
> format.setOmitEncoding();
> o.setFormat(format);

should take care of things.

/Phill
IS Dept, Software Engineer.
phill_perryman at mitel.com
http://www.mitel.com
Tel: +44 1291 436023


                                                                                                                                       
                      Jason Hunter                                                                                                     
                      <jhunter at xquery.co       To:       Phill_Perryman at Mitel.COM                                                      
                      m>                       cc:       jdom-interest at jdom.org                                                        
                                               Subject:  Re: [jdom-interest] XMLoutputter                                              
                      06/02/2004 18:24                                                                                                 
                                                                                                                                       
                                                                                                                                       




It's always a copy, so you can start with a standard version and then
tweak as you like.  I'll add that to the javadocs.

-jh-

Phill_Perryman at Mitel.COM wrote:

> With the XMLOutputter does it use a live reference to the Format object
or
> does it copy the values
>
> ie, will this work
>
> Format format = getCompactFormat();
> XMLOutputter o = new XMLOutputter(format);
> format.setOmitEncoding();
>
> o.output... will it omit the encoding or not.
>
> The reason I ask is I have several places where I create an outputter at
> the start (static) and then set its option differently in places in the
> code to get the desirable output.
>
> /Phill
> IS Dept, Software Engineer.
> phill_perryman at mitel.com
> http://www.mitel.com
> Tel: +44 1291 436023
>
>
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com

>








More information about the jdom-interest mailing list