From 45f302766a3a5ca99338fd8e5fef07dec42c0e56 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 18 Mar 2014 14:15:33 +0000 Subject: Move modules for docx reading into separate directory --- lib/office-xml-reader.js | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 lib/office-xml-reader.js (limited to 'lib/office-xml-reader.js') diff --git a/lib/office-xml-reader.js b/lib/office-xml-reader.js deleted file mode 100644 index fa67c41..0000000 --- a/lib/office-xml-reader.js +++ /dev/null @@ -1,30 +0,0 @@ -var promises = require("./promises"); - -var xmlreader = require("./xmlreader"); - - -exports.readXmlFromZipFile = readXmlFromZipFile; - -var xmlNamespaceMap = { - "http://schemas.openxmlformats.org/wordprocessingml/2006/main": "w", - "http://schemas.openxmlformats.org/officeDocument/2006/relationships": "r", - "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing": "wp", - "http://schemas.openxmlformats.org/drawingml/2006/main": "a", - "http://schemas.openxmlformats.org/drawingml/2006/picture": "pic", - "http://schemas.openxmlformats.org/package/2006/content-types": "content-types" -}; - - -function read(xmlString) { - return xmlreader.read(xmlString, xmlNamespaceMap); -} - - -function readXmlFromZipFile(docxFile, path) { - if (docxFile.exists(path)) { - return docxFile.read(path, "utf-8") - .then(read); - } else { - return promises.resolve(null); - } -} -- cgit v1.2.3