Re: [xml] xmlRegisterInputCallbacks() from Python?
- From: Daniel Veillard <veillard redhat com>
- To: Brad Clements <bkc murkworks com>
- Cc: xml gnome org
- Subject: Re: [xml] xmlRegisterInputCallbacks() from Python?
- Date: Sat, 8 Feb 2003 17:04:51 -0500
On Sat, Feb 08, 2003 at 05:01:38PM -0500, Brad Clements wrote:
Howdy,
I've searched the list archives and seen some discussion of this, but that was last year.
I need to be able to register an input callback from within Python so I can override the
http: uri scheme handler.
check the examples !
python/tests/resolver.py
-----------------
def myResolver(URL, ID, ctxt):
return(StringIO.StringIO("<foo/>"))
libxml2.setEntityLoader(myResolver)
doc = libxml2.parseFile("doesnotexist.xml")
root = doc.children
if root.name != "foo":
print "root element name error"
sys.exit(1)
doc.freeDoc()
-----------------
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]