xml.js
XML utilities.

File Location

dom/xml.js


Public Protected Private

Global Functions

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

Directory dom

File Reference