aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx/office_xml.py
diff options
context:
space:
mode:
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)
+