aboutsummaryrefslogtreecommitdiff
path: root/lib/relationships-reader.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/relationships-reader.js')
-rw-r--r--lib/relationships-reader.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/relationships-reader.js b/lib/relationships-reader.js
deleted file mode 100644
index fe6c7f1..0000000
--- a/lib/relationships-reader.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var readXmlFromZipFile = require("./office-xml-reader").readXmlFromZipFile;
-
-
-exports.readRelationshipsFromZipFile = readRelationshipsFromZipFile;
-
-
-function readRelationshipsFromZipFile(file) {
- return readXmlFromZipFile(file, "word/_rels/document.xml.rels")
- .then(function(relationshipsXml) {
- return relationshipsXml ? readRelationships(relationshipsXml) : {};
- });
-}
-
-
-function readRelationships(relationshipsXml) {
- var relationships = {};
- relationshipsXml.root.children.forEach(function(child) {
- if (child.name === "{http://schemas.openxmlformats.org/package/2006/relationships}:Relationship") {
- relationships[child.attributes.Id] = {
- target: child.attributes.Target
- };
- }
- });
- return relationships;
-}