goog.dom.xml
Functions
createDocument( opt_rootTagName, opt_namespaceUri, opt_preferActiveX ) → (Document|null)
(Document|null)
Creates an XML document appropriate for the current JS runtime
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
| ||||||||||||
Throws |
|
loadXml( xml, opt_preferActiveX ) → (Document|null)
(Document|null)
Creates an XML document from a string
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
| ||||||||
Throws |
|
selectNodes( node, path ) → (NodeList<Node>|Array<Node>)
(NodeList<Node>|Array<Node>)
selectSingleNode( node, path ) → (Node|null)
(Node|null)
Selects a single node using an Xpath expression and a root node
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
serialize( xml ) → string
string
Serializes an XML document or subtree to string.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
| ||||
Throws |
|
setAttributes( element, attributes ) → void
void
Sets multiple attributes on an element. Differs from goog.dom.setProperties in that it exclusively uses the element's setAttributes method. Use this when you need to ensure that the exact property is available as an attribute and can be read later by the native getAttribute method.
Parameters |
|
---|
Properties
ACTIVEX_SUPPORT → boolean
boolean
True if browser has ActiveXObject support. Possible override if this test become wrong in coming IE versions.
MAX_ELEMENT_DEPTH → number
number
Max XML size for MSXML2. Used to prevent potential DoS attacks.
MAX_XML_SIZE_KB → number
number
Max XML size for MSXML2. Used to prevent potential DoS attacks.