goog.dom.xml
Namespace.MAX_ELEMENT_DEPTH
{number
}Max XML size for MSXML2. Used to prevent potential DoS attacks.
.MAX_XML_SIZE_KB
{number
}Max XML size for MSXML2. Used to prevent potential DoS attacks.
.createDocument(opt_rootTagName, opt_namespaceUri)
Creates an XML document appropriate for the current JS runtime
opt_rootTagName
{string
=}
opt_namespaceUri
{string
=}
Document
}
.loadXml(xml)
Creates an XML document from a string
xml
{string
}
Document
}
.selectNodes(node, path)
Selects multiple nodes using an Xpath expression and a root node
node
{Node
}
path
{string
}
NodeList
,Array
.<Node
>)}
.selectSingleNode(node, path)
Selects a single node using an Xpath expression and a root node
node
{Node
}
path
{string
}
Node
}
.serialize(xml)
Serializes an XML document or subtree to string.
xml
{Document
|Element
}
string
}
.setAttributes(element, attributes)
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.
element
{!Element
}
attributes
{!Object
.<string
, string
>}