summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-03-15 13:51:59 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-03-15 13:51:59 (GMT)
commit95700f7cde5c0efa1ae7bc956f4ba54ec8508b51 (patch)
tree6e3059836422e8fc41693c2fd5222cb93d494d16
parente89f128a604d157254a873b4901b83f97272a999 (diff)
downloadcpython-95700f7cde5c0efa1ae7bc956f4ba54ec8508b51.zip
cpython-95700f7cde5c0efa1ae7bc956f4ba54ec8508b51.tar.gz
cpython-95700f7cde5c0efa1ae7bc956f4ba54ec8508b51.tar.bz2
Patch #527427: minidom fails to use NodeList sometimes.
-rw-r--r--Lib/xml/dom/minidom.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index 75ff3c3..963b6d0 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -44,7 +44,7 @@ if list is type([]):
else:
def NodeList():
return []
-
+
class Node(xml.dom.Node):
allnodes = {}
@@ -584,10 +584,10 @@ class Element(Node):
return self._attrsNS.has_key((namespaceURI, localName))
def getElementsByTagName(self, name):
- return _getElementsByTagNameHelper(self, name, [])
+ return _getElementsByTagNameHelper(self, name, NodeList())
def getElementsByTagNameNS(self, namespaceURI, localName):
- return _getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
+ return _getElementsByTagNameNSHelper(self, namespaceURI, localName, NodeList())
def __repr__(self):
return "<DOM Element: %s at %s>" % (self.tagName, id(self))
@@ -932,10 +932,10 @@ class Document(Node):
return a
def getElementsByTagName(self, name):
- return _getElementsByTagNameHelper(self, name, [])
+ return _getElementsByTagNameHelper(self, name, NodeList())
def getElementsByTagNameNS(self, namespaceURI, localName):
- return _getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
+ return _getElementsByTagNameNSHelper(self, namespaceURI, localName, NodeList())
def writexml(self, writer, indent="", addindent="", newl=""):
writer.write('<?xml version="1.0" ?>\n')