[xml-bindings]call to 'newNs(...)'
- From: rm fabula de
- To: xml-bindings gnome org
- Subject: [xml-bindings]call to 'newNs(...)'
- Date: Mon, 19 Aug 2002 16:20:42 +0200
Hello list,
i've encountered a strange problem with the
libxml2 python bindings.
While the following works:
doc = libxml2.newDoc("1.0")
root = doc.newChild(None, "doc", None)
root.newNs("http://example.com/doc", "my")
this doesn't:
doc = libxml2.parseFile("example.xml")
root=doc.children
root.newNs("http://example.com/doc", "my")
The error message reads as follows:
Traceback (most recent call last):
File "test.py", line 12, in ?
root.newNs("http://example.com/doc", "my")
File "/usr/local/lib/python2.1/site-packages/libxml2.py", line 1452, in newNs
if ret == None:raise treeError('xmlNewNs() failed')
libxml2.treeError: xmlNewNs() failed
What am i missing ?
Ralf Mattes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]