diff --git a/src/ol/format/gml/gml3.js b/src/ol/format/gml/gml3.js index ca4a77488e..fc53a3bdde 100644 --- a/src/ol/format/gml/gml3.js +++ b/src/ol/format/gml/gml3.js @@ -142,7 +142,7 @@ ol.format.GML3.prototype.curveMemberParser_ = function(node, objectStack) { goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT); goog.asserts.assert(node.localName == 'curveMember' || node.localName == 'curveMembers'); - ol.xml.parse(this.CURVEMEMBER_PARSERS_, node, objectStack, this); + ol.xml.parseNode(this.CURVEMEMBER_PARSERS_, node, objectStack, this); }; @@ -155,7 +155,7 @@ ol.format.GML3.prototype.surfaceMemberParser_ = function(node, objectStack) { goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT); goog.asserts.assert(node.localName == 'surfaceMember' || node.localName == 'surfaceMembers'); - ol.xml.parse(this.SURFACEMEMBER_PARSERS_, + ol.xml.parseNode(this.SURFACEMEMBER_PARSERS_, node, objectStack, this); }; diff --git a/src/ol/format/gml/gmlbase.js b/src/ol/format/gml/gmlbase.js index 83b33f63ed..b957ed2385 100644 --- a/src/ol/format/gml/gmlbase.js +++ b/src/ol/format/gml/gmlbase.js @@ -274,7 +274,7 @@ ol.format.GMLBase.prototype.pointMemberParser_ = function(node, objectStack) { goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT); goog.asserts.assert(node.localName == 'pointMember' || node.localName == 'pointMembers'); - ol.xml.parse(this.POINTMEMBER_PARSERS_, + ol.xml.parseNode(this.POINTMEMBER_PARSERS_, node, objectStack, this); }; @@ -289,7 +289,7 @@ ol.format.GMLBase.prototype.lineStringMemberParser_ = goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT); goog.asserts.assert(node.localName == 'lineStringMember' || node.localName == 'lineStringMembers'); - ol.xml.parse(this.LINESTRINGMEMBER_PARSERS_, + ol.xml.parseNode(this.LINESTRINGMEMBER_PARSERS_, node, objectStack, this); }; @@ -304,7 +304,7 @@ ol.format.GMLBase.prototype.polygonMemberParser_ = goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT); goog.asserts.assert(node.localName == 'polygonMember' || node.localName == 'polygonMembers'); - ol.xml.parse(this.POLYGONMEMBER_PARSERS_, node, + ol.xml.parseNode(this.POLYGONMEMBER_PARSERS_, node, objectStack, this); }; diff --git a/src/ol/format/gpxformat.js b/src/ol/format/gpxformat.js index 23492bbccd..ad40a92393 100644 --- a/src/ol/format/gpxformat.js +++ b/src/ol/format/gpxformat.js @@ -100,7 +100,7 @@ ol.format.GPX.parseLink_ = function(node, objectStack) { if (!goog.isNull(href)) { goog.object.set(values, 'link', href); } - ol.xml.parse(ol.format.GPX.LINK_PARSERS_, node, objectStack); + ol.xml.parseNode(ol.format.GPX.LINK_PARSERS_, node, objectStack); }; @@ -164,7 +164,7 @@ ol.format.GPX.parseTrkSeg_ = function(node, objectStack) { goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT); goog.asserts.assert(node.localName == 'trkseg'); var values = /** @type {Object} */ (objectStack[objectStack.length - 1]); - ol.xml.parse(ol.format.GPX.TRKSEG_PARSERS_, node, objectStack); + ol.xml.parseNode(ol.format.GPX.TRKSEG_PARSERS_, node, objectStack); var flatCoordinates = /** @type {Array.} */ (goog.object.get(values, 'flatCoordinates')); var ends = /** @type {Array.} */ (goog.object.get(values, 'ends')); diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index 42f088ae7a..85d28a228e 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -1000,7 +1000,7 @@ ol.format.KML.DataParser_ = function(node, objectStack) { ol.format.KML.ExtendedDataParser_ = function(node, objectStack) { goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT); goog.asserts.assert(node.localName == 'ExtendedData'); - ol.xml.parse(ol.format.KML.EXTENDED_DATA_PARSERS_, node, objectStack); + ol.xml.parseNode(ol.format.KML.EXTENDED_DATA_PARSERS_, node, objectStack); }; @@ -1066,7 +1066,7 @@ ol.format.KML.PlacemarkStyleMapParser_ = function(node, objectStack) { ol.format.KML.SchemaDataParser_ = function(node, objectStack) { goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT); goog.asserts.assert(node.localName == 'SchemaData'); - ol.xml.parse(ol.format.KML.SCHEMA_DATA_PARSERS_, node, objectStack); + ol.xml.parseNode(ol.format.KML.SCHEMA_DATA_PARSERS_, node, objectStack); }; diff --git a/src/ol/format/wfsformat.js b/src/ol/format/wfsformat.js index 51e2ae9905..055efdf447 100644 --- a/src/ol/format/wfsformat.js +++ b/src/ol/format/wfsformat.js @@ -278,7 +278,7 @@ ol.format.WFS.OGC_FID_PARSERS_ = { * @private */ ol.format.WFS.fidParser_ = function(node, objectStack) { - ol.xml.parse(ol.format.WFS.OGC_FID_PARSERS_, node, objectStack); + ol.xml.parseNode(ol.format.WFS.OGC_FID_PARSERS_, node, objectStack); }; diff --git a/src/ol/xml.js b/src/ol/xml.js index 97ede601e7..d4844472ae 100644 --- a/src/ol/xml.js +++ b/src/ol/xml.js @@ -643,7 +643,7 @@ ol.xml.makeStructureNS = function(namespaceURIs, structure, opt_structureNS) { * @param {Array.<*>} objectStack Object stack. * @param {*=} opt_this The object to use as `this`. */ -ol.xml.parse = function(parsersNS, node, objectStack, opt_this) { +ol.xml.parseNode = function(parsersNS, node, objectStack, opt_this) { var n; for (n = node.firstElementChild; !goog.isNull(n); n = n.nextElementSibling) { var parsers = parsersNS[n.namespaceURI]; @@ -670,7 +670,7 @@ ol.xml.parse = function(parsersNS, node, objectStack, opt_this) { ol.xml.pushParseAndPop = function( object, parsersNS, node, objectStack, opt_this) { objectStack.push(object); - ol.xml.parse(parsersNS, node, objectStack, opt_this); + ol.xml.parseNode(parsersNS, node, objectStack, opt_this); return objectStack.pop(); };