aboutsummaryrefslogtreecommitdiff
path: root/mammoth/xmlparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'mammoth/xmlparser.py')
-rw-r--r--mammoth/xmlparser.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/mammoth/xmlparser.py b/mammoth/xmlparser.py
index bd344a0..c645ad4 100644
--- a/mammoth/xmlparser.py
+++ b/mammoth/xmlparser.py
@@ -10,6 +10,16 @@ element = XmlElement
text = XmlText
+class node_types(object):
+ element = 1
+ text = 3
+
+
+XmlElement.node_type = node_types.element
+XmlText.node_type = node_types.text
+
+
+
def parse_xml(fileobj, namespace_mapping=None):
if namespace_mapping is None:
namespace_prefixes = {}