Commit dfb202fd authored by Chris McDonough's avatar Chris McDonough

Dont croak if subelement is an honest to god text node in getElementsByTagName

parent a7a1f804
...@@ -456,6 +456,7 @@ class Element(Node): ...@@ -456,6 +456,7 @@ class Element(Node):
""" """
nodeList = [] nodeList = []
for child in self.getChildren(): for child in self.getChildren():
if not hasattr(child, 'getNodeType'): continue
if (child.getNodeType()==ELEMENT_NODE and \ if (child.getNodeType()==ELEMENT_NODE and \
child.getTagName()==tagname or tagname== '*'): child.getTagName()==tagname or tagname== '*'):
......
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