Rename ol.xml.parse to ol.xml.parseNode
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -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.<number>} */
|
||||
(goog.object.get(values, 'flatCoordinates'));
|
||||
var ends = /** @type {Array.<number>} */ (goog.object.get(values, 'ends'));
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user