[XML-SIG] [ pyxml-Bugs-597923 ] xml.dom.minidom clone() throws NameError

noreply@sourceforge.net noreply@sourceforge.net
Tue, 20 Aug 2002 13:04:50 -0700


Bugs item #597923, was opened at 2002-08-20 20:04
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=597923&group_id=6473

Category: DOM
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: James Kew (jkew)
Assigned to: Nobody/Anonymous (nobody)
Summary: xml.dom.minidom clone() throws NameError

Initial Comment:
clone() on xml.dom.minidom.Attr fails badly in 
_cloneNode:

PythonWin 2.2.1 (#34, Apr 15 2002, 09:51:39) 
[MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond 
(mhammond@skippinet.com.au) - see 'Help/About 
PythonWin' for further copyright information.
>>> import xml.dom.minidom
>>> doc = xml.dom.minidom.Document()
>>> att = doc.createAttribute("attr")
>>> att2 = att.cloneNode(deep=0)
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\Python22\Lib\site-
packages\_xmlplus\dom\minidom.py", line 186, in 
cloneNode
    clone = _clone_node(self, deep, 
self.ownerDocument or self)
  File "C:\Python22\Lib\site-
packages\_xmlplus\dom\minidom.py", line 1248, in 
_clone_node
    elif node.nodeType == 
PROCESSING_INSTRUCTION_NODE:
NameError: global 
name 'PROCESSING_INSTRUCTION_NODE' is not 
defined

I was originally clone()ing Attr nodes in an attempt 
copy attributes from one element to another by 
iterating the attributes() NamedNodeList.

I'm using the PyXML-0.8.win32-py2.2.exe release.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106473&aid=597923&group_id=6473