[jdom-interest] document encoding

Andy Clark andyc at apache.org
Mon Jul 2 02:50:34 PDT 2001

Jason Hunter wrote:
> SAX doesn't report the encoding, unfortunately.

Xerces2 reports the auto-detected encoding of all entities
(including the document) as well as the specified encoding
in the XMLDecl/TextDecl through the Xerces Native Interface
(XNI). So while we can't push that information out through
DOM or SAX (or JDOM for that matter), you can access that
info if you program straight to XNI (or just extend the
DOMParser or SAXParser to catch that information).

Andy Clark * IBM, TRL - Japan * andyc at apache.org

More information about the jdom-interest mailing list