[XML-SIG] great python xml frustrations

bauer at mit.edu bauer at mit.edu
Fri Jan 23 18:00:57 EST 2004

I am probably lacking a big clue here, but I have been fighting
with this for a bit and thought perhaps someone could enlighten 

I want to add elements from different documents to create
a new dom.  A simple example:

from xml.dom import Document
import xml.dom.minidom

doc = xml.dom.minidom.parseString("<a>Test Document</a>")
newdoc = Document.Document(None)
newelement = newdoc.createElement("Element1")
importedNode = newdoc.importNode(doc.childNodes[0],1)

When I run this program though I get the following error:

[prompt:] python test.py
Traceback (most recent call last):
  File "test.py", line 7, in ?
    importedNode = newdoc.importNode(doc.childNodes[0],1)
"/usr/local/lib/python2.3/site-packages/_xmlplus/dom/Document.py", line
163, in importNode
    return importedNode.cloneNode(deep, newOwner=self)
TypeError: cloneNode() got an unexpected keyword argument 'newOwner'

I am running python 2.3.3, and have PyXML-0.8.3 and 4Suite installed. 
Not sure where the problem actually is so I have tried a number of
different versions of 4Suite.

Any help would be greatly appreciated.


More information about the XML-SIG mailing list