Skip to content

Commit 801f82e

Browse files
committed
Get raw XML. Skip namespace definitions in Description.
1 parent c26dd62 commit 801f82e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

js/load-image-xmp.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
}
6565
var xml = arrPacketData.join("");
6666

67+
loadImage.XmpMap.prototype.getXml = function (id) {
68+
return xml;
69+
}
70+
6771
data.xmp = new loadImage.XmpMap();
6872

6973
// Create an XMLDocument and extract the attributes from the
@@ -96,6 +100,12 @@
96100
var attr;
97101
for (var k = 0; k < node.attributes.length; k++) {
98102
attr = node.attributes[k];
103+
104+
// Don't include namespace definitions.
105+
if (attr.prefix === "xmlns"){
106+
continue;
107+
}
108+
99109
data.xmp[attr.localName] = attr.value;
100110
}
101111
}

0 commit comments

Comments
 (0)