[XML-SIG] how to get the 'codepage' from a xml document
Remy C. Cool
dev-xml@smartology.nl
Thu, 9 Jan 2003 19:42:59 +0100
I found that the class InputSource has a method getEncoding ... now I
just have to find out how to get this implemented in a such a way
that I can pass the encoding to the parser.
Does anyone know where I can find an example on how to do this?
> > I've probably overlooked something in the manuals and references,
> > but I can't find a method on how to extract the codepage/encoding
> > declaration from an xml file using sax.
>
> You haven't overlooked anything: SAX does not provide this
> information (as it doesn't provide a lot of other lexical
> information).
>
> Notice that in the presence of external entities, "the" encoding is
> not a meaningful term: different encodings might be used in
> different parts of the document.