Patch #527427: minidom fails to use NodeList sometimes.
This commit is contained in:
parent
e89f128a60
commit
95700f7cde
|
@ -584,10 +584,10 @@ class Element(Node):
|
||||||
return self._attrsNS.has_key((namespaceURI, localName))
|
return self._attrsNS.has_key((namespaceURI, localName))
|
||||||
|
|
||||||
def getElementsByTagName(self, name):
|
def getElementsByTagName(self, name):
|
||||||
return _getElementsByTagNameHelper(self, name, [])
|
return _getElementsByTagNameHelper(self, name, NodeList())
|
||||||
|
|
||||||
def getElementsByTagNameNS(self, namespaceURI, localName):
|
def getElementsByTagNameNS(self, namespaceURI, localName):
|
||||||
return _getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
|
return _getElementsByTagNameNSHelper(self, namespaceURI, localName, NodeList())
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<DOM Element: %s at %s>" % (self.tagName, id(self))
|
return "<DOM Element: %s at %s>" % (self.tagName, id(self))
|
||||||
|
@ -932,10 +932,10 @@ class Document(Node):
|
||||||
return a
|
return a
|
||||||
|
|
||||||
def getElementsByTagName(self, name):
|
def getElementsByTagName(self, name):
|
||||||
return _getElementsByTagNameHelper(self, name, [])
|
return _getElementsByTagNameHelper(self, name, NodeList())
|
||||||
|
|
||||||
def getElementsByTagNameNS(self, namespaceURI, localName):
|
def getElementsByTagNameNS(self, namespaceURI, localName):
|
||||||
return _getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
|
return _getElementsByTagNameNSHelper(self, namespaceURI, localName, NodeList())
|
||||||
|
|
||||||
def writexml(self, writer, indent="", addindent="", newl=""):
|
def writexml(self, writer, indent="", addindent="", newl=""):
|
||||||
writer.write('<?xml version="1.0" ?>\n')
|
writer.write('<?xml version="1.0" ?>\n')
|
||||||
|
|
Loading…
Reference in New Issue