Java Mailing List Archive

http://www.junlu.com/

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

Re: [jdom-interest] Getting original Encoding and changing the defau
 lt UTF-8

Jason Hunter

2004-09-10

Replies:

> How can the original encoding in a document be accessed via JDOM? Don't see
> any method calls concerning the encoding setting except with the output
> formatter.

Sadly you can't because SAX doesn't expose this.

> Also, is there are way to set the default encoding to something other than
> UTF-8?

XMLOutputter takes a Format object that has a setEncoding() method.

-jh-

_______________________________________________
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.