summaryrefslogtreecommitdiff
path: root/lib/docx/relationships-reader.js
blob: 93fc618f6ff71b2092e51c4917299836cee320cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
exports.readRelationships = readRelationships;


function readRelationships(element) {
    var relationships = {};
    element.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;
}