dom.xml

Classes


Public Protected Private

Global Functions

goog.dom.xml.createDocument(opt_rootTagNameopt_namespaceUri) Document
Creates an XML document appropriate for the current JS runtime
Arguments:
opt_rootTagName : string=
The root tag name.
opt_namespaceUri : string=
Namespace URI of the document element.
Returns: Document  The new document.
code »
goog.dom.xml.createMsXmlDocument_() Document
Creates an instance of the MSXML2.DOMDocument.
Returns: Document  The new document.
code »
goog.dom.xml.loadXml(xml) Document
Creates an XML document from a string
Arguments:
xml : string
The text.
Returns: Document  XML document from the text.
code »
goog.dom.xml.selectNodes(nodepath) ⇒ (NodeList,Array.<Node>)
Selects multiple nodes using an Xpath expression and a root node
Arguments:
node : Node
The root node.
path : string
Xpath selector.
Returns: (NodeList,Array.<Node>)  The selected nodes, or empty array if no matching nodes.
code »
goog.dom.xml.selectSingleNode(nodepath) Node
Selects a single node using an Xpath expression and a root node
Arguments:
node : Node
The root node.
path : string
Xpath selector.
Returns: Node  The selected node, or null if no matching node.
code »
goog.dom.xml.serialize(xml) string
Serializes an XML document or subtree to string.
Arguments:
xml : Document | Element
The document or the root node of the subtree.
Returns: string  The serialized XML.
code »
goog.dom.xml.setAttributes(elementattributes)
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.
Arguments:
element : !Element
XML or DOM element to set attributes on.
attributes : !Object.<string, string>
Map of property:value pairs.
code »

Global Properties

goog.dom.xml.MAX_ELEMENT_DEPTH :
Max XML size for MSXML2. Used to prevent potential DoS attacks.
Code »
goog.dom.xml.MAX_XML_SIZE_KB :
Max XML size for MSXML2. Used to prevent potential DoS attacks.
Code »

Package dom

Package Reference