diff --git a/src/ol/format/gml/gmlbaseformat.js b/src/ol/format/gml/gmlbaseformat.js index 3afda6975d..64d0fe914d 100644 --- a/src/ol/format/gml/gmlbaseformat.js +++ b/src/ol/format/gml/gmlbaseformat.js @@ -111,7 +111,7 @@ ol.format.GMLBase.ONLY_WHITESPACE_RE_ = /^[\s\xa0]*$/; ol.format.GMLBase.prototype.readFeaturesInternal = function(node, objectStack) { goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT, 'node.nodeType should be ELEMENT'); - var localName = ol.xml.getLocalName(node); + var localName = node.localName; var features; if (localName == 'FeatureCollection') { if (node.namespaceURI === 'http://www.opengis.net/wfs') { @@ -219,7 +219,7 @@ ol.format.GMLBase.prototype.readFeatureElement = function(node, objectStack) { ol.xml.getAttributeNS(node, ol.format.GMLBase.GMLNS, 'id'); var values = {}, geometryName; for (n = node.firstElementChild; n; n = n.nextElementSibling) { - var localName = ol.xml.getLocalName(n); + var localName = n.localName; // Assume attribute elements have one child node and that the child // is a text or CDATA node (to be treated as text). // Otherwise assume it is a geometry node. diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index 66dc5301b4..936ae8b294 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -1745,7 +1745,7 @@ ol.format.KML.prototype.getExtensions = function() { ol.format.KML.prototype.readDocumentOrFolder_ = function(node, objectStack) { goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT, 'node.nodeType should be ELEMENT'); - var localName = ol.xml.getLocalName(node); + var localName = node.localName; goog.asserts.assert(localName == 'Document' || localName == 'Folder', 'localName should be Document or Folder'); // FIXME use scope somehow @@ -1923,7 +1923,7 @@ ol.format.KML.prototype.readFeaturesFromNode = function(node, opt_options) { return []; } var features; - var localName = ol.xml.getLocalName(node); + var localName = node.localName; if (localName == 'Document' || localName == 'Folder') { features = this.readDocumentOrFolder_( node, [this.getReadOptions(node, opt_options)]); @@ -2009,7 +2009,7 @@ ol.format.KML.prototype.readNameFromNode = function(node) { } } for (n = node.firstElementChild; n; n = n.nextElementSibling) { - var localName = ol.xml.getLocalName(n); + var localName = n.localName; if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) && (localName == 'Document' || localName == 'Folder' || @@ -2080,7 +2080,7 @@ ol.format.KML.prototype.readNetworkLinksFromNode = function(node) { } } for (n = node.firstElementChild; n; n = n.nextElementSibling) { - var localName = ol.xml.getLocalName(n); + var localName = n.localName; if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) && (localName == 'Document' || localName == 'Folder' || diff --git a/src/ol/format/wmsgetfeatureinfoformat.js b/src/ol/format/wmsgetfeatureinfoformat.js index 6b669742a6..f8437b91bd 100644 --- a/src/ol/format/wmsgetfeatureinfoformat.js +++ b/src/ol/format/wmsgetfeatureinfoformat.js @@ -75,7 +75,7 @@ ol.format.WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack node.setAttribute('namespaceURI', this.featureNS_); goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT, 'node.nodeType should be ELEMENT'); - var localName = ol.xml.getLocalName(node); + var localName = node.localName; /** @type {Array.