Add ol.xml.load
This commit is contained in:
@@ -48,6 +48,15 @@ ol.xml.getAllTextContent_ = function(node, normalizeWhitespace, accumulator) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} xml XML.
|
||||||
|
* @return {Document} Document.
|
||||||
|
*/
|
||||||
|
ol.xml.load = function(xml) {
|
||||||
|
return new DOMParser().parseFromString(xml, 'application/xml');
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {function(this: T, Node, Array.<*>): (Array.<*>|undefined)}
|
* @param {function(this: T, Node, Array.<*>): (Array.<*>|undefined)}
|
||||||
* valueReader Value reader.
|
* valueReader Value reader.
|
||||||
|
|||||||
Reference in New Issue
Block a user