Use firstElementChild in ol.xml.parse
This commit is contained in:
+6
-8
@@ -173,14 +173,12 @@ 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];
|
if (goog.isDef(parser)) {
|
||||||
if (goog.isDef(parser)) {
|
parser.call(opt_obj, n, objectStack);
|
||||||
parser.call(opt_obj, n, objectStack);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user