From 5a5112f8c0286da6875e54b2e61a32288135d1e8 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 26 Dec 2015 10:50:25 +0000 Subject: Split off office_xml module --- mammoth/docx/office_xml.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 mammoth/docx/office_xml.py (limited to 'mammoth/docx/office_xml.py') 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) + -- cgit v1.2.3