[jdom-interest] Output a XML String without the encoding

Bradley S. Huffman hip at a.cs.okstate.edu
Mon Mar 28 11:19:06 PST 2005


XMLOutputter outputter = new XMLOutputter();
Foramt format = outputter.getFormat();
format.setOmitDeclarations(true);
outputter.setFormat(format);

Brad

"Trikannad, Mahesh" writes:

> Hi All,
> =0D
> Is there a way I can ouput the XML string off a Document, without the first=
>  line containing the encoding=2E
> ( The line with <?xml version=3D"1=2E0" encoding=3D"UTF-8"?> )
> =0D
> Iam talking to a external system, which for some reason does not want the=
>  encoding=2E
> =0D
> Currently this is what I do
> =0D
>  public String toString()
>    {
>     XMLOutputter outputter =3D new XMLOutputter();
>     return outputter=2EoutputString(myDocument);
>    }
> =0D
> Regards
> =0D
> Mahesh


More information about the jdom-interest mailing list