[lxml-dev] How do I get the encoding of an XML document from libxml2?

Jan. 3, 2007
9:59 a.m.
Hi there This request actually concerns *avoiding* depending on lxml, so apologies for that :-] I'd like to find the encoding of an XML document, as detected by libxml2, using the Python bindings. From lxml, I can get it like this:
According to the lxml API docs, lxml gets this information from libxml2 (see http://codespeak.net/lxml/api.html#parsers ) How do I get at it without depending on lxml? The only way I've been able to find is using debugDumpDocumentHead, which just prints to stdout.
Regards, -- jean . .. .... //\\\oo///\\
6627
Age (days ago)
6627
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jean Jordaan