aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mammoth/docx/xmlparser.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mammoth/docx/xmlparser.py b/mammoth/docx/xmlparser.py
index 74d8730..2cfe1e0 100644
--- a/mammoth/docx/xmlparser.py
+++ b/mammoth/docx/xmlparser.py
@@ -14,7 +14,10 @@ class XmlElement(XmlElementBase):
def find_children(self, name):
- return XmlElementList(filter(lambda child: child.name == name, self.children))
+ return XmlElementList(filter(
+ lambda child: child.node_type == node_types.element and child.name == name,
+ self.children
+ ))
class XmlElementList(object):