Use firstElementChild in ol.xml.parse
This commit is contained in:
+1
-3
@@ -173,8 +173,7 @@ ol.xml.makeParsersNS = function(namespaceURIs, parsers, opt_parsersNS) {
|
|||||||
*/
|
*/
|
||||||
ol.xml.parse = function(parsersNS, node, objectStack, opt_obj) {
|
ol.xml.parse = function(parsersNS, node, objectStack, opt_obj) {
|
||||||
var n;
|
var n;
|
||||||
for (n = node.firstChild; !goog.isNull(n); n = n.nextSibling) {
|
for (n = node.firstElementChild; !goog.isNull(n); n = n.nextElementSibling) {
|
||||||
if (n.nodeType == goog.dom.NodeType.ELEMENT) {
|
|
||||||
var parsers = parsersNS[n.namespaceURI];
|
var parsers = parsersNS[n.namespaceURI];
|
||||||
if (goog.isDef(parsers)) {
|
if (goog.isDef(parsers)) {
|
||||||
var parser = parsers[n.localName];
|
var parser = parsers[n.localName];
|
||||||
@@ -183,7 +182,6 @@ ol.xml.parse = function(parsersNS, node, objectStack, opt_obj) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user