diff options
author | Fred Drake <fdrake@acm.org> | 2001-07-04 06:25:53 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-07-04 06:25:53 (GMT) |
commit | fbe7b4fc8c48aa722ef4838182091d1aac75681d (patch) | |
tree | 3bb176fc6da9831bc461f320e5dbeda1c90ef975 /Lib/xml/dom | |
parent | ec3dfdee6a09e1ad8d4e319876d0cf7691397245 (diff) | |
download | cpython-fbe7b4fc8c48aa722ef4838182091d1aac75681d.zip cpython-fbe7b4fc8c48aa722ef4838182091d1aac75681d.tar.gz cpython-fbe7b4fc8c48aa722ef4838182091d1aac75681d.tar.bz2 |
Make the implementations of getElementsByTagName() and
getElementsByTagNameNS() consistent in form as well as functionality
(cosmetic).
Diffstat (limited to 'Lib/xml/dom')
-rw-r--r-- | Lib/xml/dom/minidom.py | 16 |
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') |