Remove setAttributeNS function from ol/xml
And create a const for the `XMLSchema-instance` URI
This commit is contained in:
@@ -25,14 +25,19 @@ import {extend} from './array.js';
|
||||
|
||||
/**
|
||||
* This document should be used when creating nodes for XML serializations. This
|
||||
* document is also used by {@link module:ol/xml~createElementNS} and
|
||||
* {@link module:ol/xml~setAttributeNS}
|
||||
* document is also used by {@link module:ol/xml~createElementNS}
|
||||
* @const
|
||||
* @type {Document}
|
||||
*/
|
||||
export const DOCUMENT = document.implementation.createDocument('', '', null);
|
||||
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
export const XML_SCHEMA_INSTANCE_URI = 'http://www.w3.org/2001/XMLSchema-instance';
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} namespaceURI Namespace URI.
|
||||
* @param {string} qualifiedName Qualified name.
|
||||
@@ -112,17 +117,6 @@ export function getAttributeNS(node, namespaceURI, name) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {?string} namespaceURI Namespace URI.
|
||||
* @param {string} name Attribute name.
|
||||
* @param {string|number} value Value.
|
||||
*/
|
||||
export function setAttributeNS(node, namespaceURI, name, value) {
|
||||
node.setAttributeNS(namespaceURI, name, value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parse an XML string to an XML Document.
|
||||
* @param {string} xml XML.
|
||||
|
||||
Reference in New Issue
Block a user