aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx/office_xml.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-12-26 10:50:25 +0000
committerMichael Williamson <mike@zwobble.org>2015-12-26 10:50:25 +0000
commit5a5112f8c0286da6875e54b2e61a32288135d1e8 (patch)
tree7d36f426053abb7811659af92079d11d7e2ccdb2 /mammoth/docx/office_xml.py
parentff2b55c0421c2f170f75ebf4fb642b4b6042ce02 (diff)
Split off office_xml module
Diffstat (limited to 'mammoth/docx/office_xml.py')
-rw-r--r--mammoth/docx/office_xml.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/mammoth/docx/office_xml.py b/mammoth/docx/office_xml.py
new file mode 100644
index 0000000..4dffb44
--- /dev/null
+++ b/mammoth/docx/office_xml.py
@@ -0,0 +1,20 @@
+from .xmlparser import parse_xml
+
+
+_namespaces = [
+ ("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main"),
+ ("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"),
+ ("a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
+ ("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture"),
+ ("content-types", "http://schemas.openxmlformats.org/package/2006/content-types"),
+ ("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
+ ("relationships", "http://schemas.openxmlformats.org/package/2006/relationships"),
+ ("v", "urn:schemas-microsoft-com:vml"),
+ ("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"),
+ ("office-word", "urn:schemas-microsoft-com:office:word"),
+]
+
+
+def read(fileobj):
+ return parse_xml(fileobj, _namespaces)
+