Export useful xml functions
This commit is contained in:
@@ -80,6 +80,7 @@ ol.xml.createElementNS =
|
|||||||
* @param {Node} node Node.
|
* @param {Node} node Node.
|
||||||
* @param {boolean} normalizeWhitespace Normalize whitespace.
|
* @param {boolean} normalizeWhitespace Normalize whitespace.
|
||||||
* @return {string} All text content.
|
* @return {string} All text content.
|
||||||
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.xml.getAllTextContent = function(node, normalizeWhitespace) {
|
ol.xml.getAllTextContent = function(node, normalizeWhitespace) {
|
||||||
return ol.xml.getAllTextContent_(node, normalizeWhitespace, []).join('');
|
return ol.xml.getAllTextContent_(node, normalizeWhitespace, []).join('');
|
||||||
@@ -334,6 +335,7 @@ ol.xml.setAttributeNS =
|
|||||||
/**
|
/**
|
||||||
* @param {string} xml XML.
|
* @param {string} xml XML.
|
||||||
* @return {Document} Document.
|
* @return {Document} Document.
|
||||||
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.xml.load = function(xml) {
|
ol.xml.load = function(xml) {
|
||||||
return new DOMParser().parseFromString(xml, 'application/xml');
|
return new DOMParser().parseFromString(xml, 'application/xml');
|
||||||
|
|||||||
Reference in New Issue
Block a user