How to force SAX parser to ignore encoding problems

Łukasz lkrzysiak at gmail.com
Fri Jul 31 03:28:54 EDT 2009


Hi,
I have a problem with my XML parser (created with libraries from
xml.sax package). When parser finds a invalid character (in CDATA
section) for example �, throws an exception SAXParseException.

Is there any way to just ignore this kind of problem. Maybe there is a
way to set up parser in less strict mode?

I know that I can catch this exception and determine if this is this
kind of problem and then ignore this, but I am asking about any global
setting.




More information about the Python-list mailing list