detecting declared character encoding of an XML file during parsing?

B

bugbear

I'm (successfully) parsing an XML file using SAX.
All the internal data passed to the various handlers
is (of course) in nice Java String format AKA
Unicode.

No problem.

For reasons of partability and/or courtesy
I would like to construct my "reply" XML file
in the same encoding as the "request" XML file
I just parsed.

So my question is: is there anyway from a SAX (or DOM?)
parser to find out what encoding was declared
in the XML file?

BugBear
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top