[xml] Python and Error Handling
- From: "nathan bullock" <nathanbullock gmail com>
- To: xml gnome org
- Subject: [xml] Python and Error Handling
- Date: Mon, 26 Jun 2006 10:14:35 -0600
In my python code I parse an xml document using:
import libxml2
body = libxml2.parseDoc(text)
Now at one point I don't want any errors logged to stderr so I do:
libxml2.registerErrorHandler(None, "")
body = libxml2.parseDoc(text)
Now what I can't figure out is once I have done that how do I turn
error logging back on?
Something like: libxml2.resetErrorHandler()
or: libxml2.registerErrorHandler(libxml2.defaultErrorHandler)
Nathan Bullock
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]