summaryrefslogtreecommitdiffstats
path: root/Lib/xml/dom/minidom.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/xml/dom/minidom.py')
-rw-r--r--Lib/xml/dom/minidom.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index 59f86a7..d440045 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -551,9 +551,7 @@ class Element(Node):
return _getElementsByTagNameHelper(self, name, [])
def getElementsByTagNameNS(self, namespaceURI, localName):
- rc = []
- _getElementsByTagNameNSHelper(self, namespaceURI, localName, rc)
- return rc
+ return _getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
def __repr__(self):
return "<DOM Element: %s at %s>" % (self.tagName, id(self))
@@ -881,15 +879,11 @@ class Document(Node):
a.value = ""
return a
- def getElementsByTagNameNS(self, namespaceURI, localName):
- rc = []
- _getElementsByTagNameNSHelper(self, namespaceURI, localName, rc)
- return rc
-
def getElementsByTagName(self, name):
- rc = []
- _getElementsByTagNameHelper(self, name, rc)
- return rc
+ return _getElementsByTagNameHelper(self, name, [])
+
+ def getElementsByTagNameNS(self, namespaceURI, localName):
+ return _getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
def writexml(self, writer, indent="", addindent="", newl=""):
writer.write('<?xml version="1.0" ?>\n')