mirror of
https://github.com/mwilliamson/mammoth.js.git
synced 2024-12-08 15:14:29 +00:00
15 lines
452 B
JavaScript
15 lines
452 B
JavaScript
exports.readRelationships = readRelationships;
|
|
|
|
|
|
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;
|
|
}
|