Commit 2ea6d7f1 authored by Amos Latteier's avatar Amos Latteier

Fix to getElementsByTagName which only shows up when using XMLDocument. Thanks to Andrew Kuchling.

parent 99708085
......@@ -438,8 +438,9 @@ class Element(Node):
if (child.getNodeType()==ELEMENT_NODE and \
child.getTagName()==tagname or tagname== '*'):
nodeList.append(child)
n1 = child.getElementsByTagName(tagname)
nodeList = nodeList + n1._data
if hasattr(child, 'getElementsByTagName'):
n1 = child.getElementsByTagName(tagname)
nodeList = nodeList + n1._data
return NodeList(nodeList)
......@@ -615,4 +616,4 @@ class Attr(Acquisition.Implicit, Node):
original document, this is true; otherwise, it is false."""
return self.specified
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment