blob: deabdc1a82dc455adbb559c0a27bb38120438948 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Module: odatajs/xml</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Module: odatajs/xml</h1>
<section>
<header>
<h2>
odatajs/xml
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line22">line 22</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="hasLeadingOrTrailingWhitespace"><span class="type-signature">&lt;inner> </span>hasLeadingOrTrailingWhitespace<span class="signature">(text)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
Checks whether the specified string has leading or trailing spaces.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>text</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">String to check.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line46">line 46</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
true if text has any leading or trailing whitespace; false otherwise.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isWhitespace"><span class="type-signature">&lt;inner> </span>isWhitespace<span class="signature">(text)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
Determines whether the specified text is empty or whitespace.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>text</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Value to inspect.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line55">line 55</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
true if the text value is empty or all whitespace; false otherwise.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isWhitespacePreserveContext"><span class="type-signature">&lt;inner> </span>isWhitespacePreserveContext<span class="signature">(domElement)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
Determines whether the specified element has xml:space='preserve' applied.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domElement</code></td>
<td class="type">
</td>
<td class="description last">Element to inspect.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line66">line 66</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Whether xml:space='preserve' is in effect.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isXmlNSDeclaration"><span class="type-signature">&lt;inner> </span>isXmlNSDeclaration<span class="signature">(domAttribute)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
</dt>
<dd>
<div class="description">
Determines whether the attribute is a XML namespace declaration.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domAttribute</code></td>
<td class="type">
</td>
<td class="description last">Element to inspect.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line87">line 87</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
True if the attribute is a namespace declaration (its name is 'xmlns' or starts with 'xmlns:'; false otherwise.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="msXmlDom"><span class="type-signature">&lt;inner> </span>msXmlDom<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
</dt>
<dd>
<div class="description">
Creates an configures new MSXML 6.0 or MSXML 3.0 ActiveX object.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line128">line 128</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
New MSXML 3.0 ActiveX object. This function will try to create a new MSXML 6.0 ActiveX object. If it fails then it will fallback to create a new MSXML 3.0 ActiveX object. Any exception that happens during the creation of the MSXML 6.0 will be handled by the function while the ones that happend during the creation of the MSXML 3.0 will be thrown.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="msXmlDom3"><span class="type-signature">&lt;inner> </span>msXmlDom3<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
</dt>
<dd>
<div class="description">
Creates an configures new MSXML 3.0 ActiveX object.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line110">line 110</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
New MSXML 3.0 ActiveX object. This function throws any exception that occurs during the creation of the MSXML 3.0 ActiveX object.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="msXmlParse"><span class="type-signature">&lt;inner> </span>msXmlParse<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
</dt>
<dd>
<div class="description">
Parses an XML string using the MSXML DOM.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line146">line 146</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
New MSXML DOMDocument node representing the parsed XML string. This function throws any exception that occurs during the creation of the MSXML ActiveX object. It also will throw an exception in case of a parsing error.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="safeSetProperty"><span class="type-signature">&lt;inner> </span>safeSetProperty<span class="signature">(obj, name, value)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Safely set as property in an object by invoking obj.setProperty.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>obj</code></td>
<td class="type">
</td>
<td class="description last">Object that exposes a setProperty method.</td>
</tr>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Property name</td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
</td>
<td class="description last">Property value.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line97">line 97</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlAppendChild"><span class="type-signature">&lt;inner> </span>xmlAppendChild<span class="signature">(parent, child)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Appends a child node or a string value to a parent DOM node.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parent</code></td>
<td class="type">
</td>
<td class="description last">DOM node to which the child will be appended.</td>
</tr>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
</td>
<td class="description last">Child DOM node or string value to append to the parent.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line588">line 588</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The parent with the appended child or string value. If child is a string value, then a new DOM text node is going to be created for it and then appended to the parent.
</div>
</dd>
<dt>
<h4 class="name" id="xmlAppendChildren"><span class="type-signature">&lt;inner> </span>xmlAppendChildren<span class="signature">(parent, children)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Appends a collection of child nodes or string values to a parent DOM node.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parent</code></td>
<td class="type">
</td>
<td class="description last">DOM node to which the children will be appended.</td>
</tr>
<tr>
<td class="name"><code>children</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last">Array containing DOM nodes or string values that will be appended to the parent.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line569">line 569</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The parent with the appended children or string values. If a value in the children collection is a string, then a new DOM text node is going to be created for it and then appended to the parent.
</div>
</dd>
<dt>
<h4 class="name" id="xmlAppendText"><span class="type-signature">&lt;inner> </span>xmlAppendText<span class="signature">(domNode, textNode)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Appends a text node into the specified DOM element node.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="description last">DOM node for the element.</td>
</tr>
<tr>
<td class="name"><code>textNode</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Text to append as a child of element.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line246">line 246</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlAttributeNode"><span class="type-signature">&lt;inner> </span>xmlAttributeNode<span class="signature">(domNode, localName, nsURI)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Gets an attribute node from a DOM element.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="description last">DOM node for the owning element.</td>
</tr>
<tr>
<td class="name"><code>localName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Local name of the attribute.</td>
</tr>
<tr>
<td class="name"><code>nsURI</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Namespace URI of the attribute.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line289">line 289</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The attribute node, null if not found.
</div>
</dd>
<dt>
<h4 class="name" id="xmlAttributes"><span class="type-signature">&lt;inner> </span>xmlAttributes<span class="signature">(element, onAttributeCallback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Iterates through the XML element's attributes and invokes the callback function for each one.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>element</code></td>
<td class="type">
</td>
<td class="description last">Wrapped element to iterate over.</td>
</tr>
<tr>
<td class="name"><code>onAttributeCallback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback function to invoke with wrapped attribute nodes.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line263">line 263</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlAttributeValue"><span class="type-signature">&lt;inner> </span>xmlAttributeValue<span class="signature">(domNode, localName, nsURI)</span><span class="type-signature"> &rarr; {String}</span></h4>
</dt>
<dd>
<div class="description">
Returns the value of a DOM element's attribute.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="description last">DOM node for the owning element.</td>
</tr>
<tr>
<td class="name"><code>localName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Local name of the attribute.</td>
</tr>
<tr>
<td class="name"><code>nsURI</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Namespace URI of the attribute.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line277">line 277</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
- The attribute value, null if not found (may be null)
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlBaseURI"><span class="type-signature">&lt;inner> </span>xmlBaseURI<span class="signature">(domNode, <span class="optional">baseURI</span>)</span><span class="type-signature"> &rarr; {String}</span></h4>
</dt>
<dd>
<div class="description">
Gets the value of the xml:base attribute on the specified element.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="attributes">
</td>
<td class="description last">Element to get xml:base attribute value from.</td>
</tr>
<tr>
<td class="name"><code>baseURI</code></td>
<td class="type">
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">Base URI used to normalize the value of the xml:base attribute ( may be null)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line304">line 304</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Value of the xml:base attribute if found; the baseURI or null otherwise.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlChildElements"><span class="type-signature">&lt;inner> </span>xmlChildElements<span class="signature">(domNode, onElementCallback)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Iterates through the XML element's child DOM elements and invokes the callback function for each one.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="description last">DOM Node containing the DOM elements to iterate over.</td>
</tr>
<tr>
<td class="name"><code>onElementCallback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last">Callback function to invoke for each child DOM element.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line315">line 315</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlDom"><span class="type-signature">&lt;inner> </span>xmlDom<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Creates a new empty DOM document node.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line555">line 555</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
New DOM document node. This function will first try to create a native DOM document using the browsers createDocument function. If the browser doesn't support this but supports ActiveXObject, then an attempt to create an MSXML 6.0 DOM will be made. If this attempt fails too, then an attempt for creating an MXSML 3.0 DOM will be made. If this last attemp fails or the browser doesn't support ActiveXObject then an exception will be thrown.
</div>
</dd>
<dt>
<h4 class="name" id="xmlFindElementByPath"><span class="type-signature">&lt;inner> </span>xmlFindElementByPath<span class="signature">(root, namespaceURI, path)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Gets the descendant element under root that corresponds to the specified path and namespace URI.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>root</code></td>
<td class="type">
</td>
<td class="description last">DOM element node from which to get the descendant element.</td>
</tr>
<tr>
<td class="name"><code>namespaceURI</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">The namespace URI of the element to match.</td>
</tr>
<tr>
<td class="name"><code>path</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Path to the desired descendant element.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line334">line 334</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The element specified by path and namespace URI. All the elements in the path are matched against namespaceURI. The function will stop searching on the first element that doesn't match the namespace and the path.
</div>
</dd>
<dt>
<h4 class="name" id="xmlFindNodeByPath"><span class="type-signature">&lt;inner> </span>xmlFindNodeByPath<span class="signature">(root, namespaceURI, path)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Gets the DOM element or DOM attribute node under root that corresponds to the specified path and namespace URI.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>root</code></td>
<td class="type">
</td>
<td class="description last">DOM element node from which to get the descendant node.</td>
</tr>
<tr>
<td class="name"><code>namespaceURI</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">The namespace URI of the node to match.</td>
</tr>
<tr>
<td class="name"><code>path</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Path to the desired descendant node.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line353">line 353</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The node specified by path and namespace URI. This function will traverse the path and match each node associated to a path segement against the namespace URI. The traversal stops when the whole path has been exahusted or a node that doesn't belogong the specified namespace is encountered. The last segment of the path may be decorated with a starting @ character to indicate that the desired node is a DOM attribute.
</div>
</dd>
<dt>
<h4 class="name" id="xmlFirstChildElement"><span class="type-signature">&lt;inner> </span>xmlFirstChildElement<span class="signature">(domNode, <span class="optional">namespaceURI</span>, <span class="optional">localName</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Returns the first child DOM element under the specified DOM node that matches the specified namespace URI and local name.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="attributes">
</td>
<td class="description last">DOM node from which the child DOM element is going to be retrieved.</td>
</tr>
<tr>
<td class="name"><code>namespaceURI</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>localName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line376">line 376</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The node's first child DOM element that matches the specified namespace URI and local name; null otherwise.
</div>
</dd>
<dt>
<h4 class="name" id="xmlFirstDescendantElement"><span class="type-signature">&lt;inner> </span>xmlFirstDescendantElement<span class="signature">(domNode, <span class="optional">namespaceURI</span>, <span class="optional">localName</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Returns the first descendant DOM element under the specified DOM node that matches the specified namespace URI and local name.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="attributes">
</td>
<td class="description last">DOM node from which the descendant DOM element is going to be retrieved.</td>
</tr>
<tr>
<td class="name"><code>namespaceURI</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>localName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line387">line 387</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The node's first descendant DOM element that matches the specified namespace URI and local name; null otherwise.
</div>
</dd>
<dt>
<h4 class="name" id="xmlFirstElementMaybeRecursive"><span class="type-signature">&lt;inner> </span>xmlFirstElementMaybeRecursive<span class="signature">(domNode, <span class="optional">namespaceURI</span>, <span class="optional">localName</span>, recursive)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Returns the first descendant DOM element under the specified DOM node that matches the specified namespace URI and local name.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="attributes">
</td>
<td class="description last">DOM node from which the descendant DOM element is going to be retrieved.</td>
</tr>
<tr>
<td class="name"><code>namespaceURI</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>localName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>recursive</code></td>
<td class="type">
<span class="param-type">Boolean</span>
</td>
<td class="attributes">
</td>
<td class="description last">- True if the search should include all the descendants of the DOM node. - False if the search should be scoped only to the direct children of the DOM node.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line404">line 404</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The node's first descendant DOM element that matches the specified namespace URI and local name; null otherwise.
</div>
</dd>
<dt>
<h4 class="name" id="xmlInnerText"><span class="type-signature">&lt;inner> </span>xmlInnerText<span class="signature">(xmlElement)</span><span class="type-signature"> &rarr; {String}</span></h4>
</dt>
<dd>
<div class="description">
Gets the concatenated value of all immediate child text and CDATA nodes for the specified element.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>xmlElement</code></td>
<td class="type">
</td>
<td class="description last">Element to get values for.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line425">line 425</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Text for all direct children.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlLocalName"><span class="type-signature">&lt;inner> </span>xmlLocalName<span class="signature">(domNode)</span><span class="type-signature"> &rarr; {String}</span></h4>
</dt>
<dd>
<div class="description">
Returns the localName of a XML node.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="description last">DOM node to get the value from.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line472">line 472</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
localName of domNode.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlNamespaceURI"><span class="type-signature">&lt;inner> </span>xmlNamespaceURI<span class="signature">(domNode)</span><span class="type-signature"> &rarr; {String}</span></h4>
</dt>
<dd>
<div class="description">
Returns the namespace URI of a XML node.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>domNode</code></td>
<td class="type">
</td>
<td class="description last">DOM node to get the value from.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line481">line 481</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Namespace URI of domNode.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xmlNewAttribute"><span class="type-signature">&lt;inner> </span>xmlNewAttribute<span class="signature">(dom, namespaceURI, qualifiedName, value)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Creates a new DOM attribute node.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>dom</code></td>
<td class="type">
</td>
<td class="description last">DOM document used to create the attribute.</td>
</tr>
<tr>
<td class="name"><code>namespaceURI</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Namespace URI.</td>
</tr>
<tr>
<td class="name"><code>qualifiedName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Qualified OData name</td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Value of the new attribute</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="xml.js.html">xml.js</a>, <a href="xml.js.html#line611">line 611</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
DOM attribute node for the namespace declaration.
</div>
</dd>
<dt>
<h4 class="name" id="xmlNewElement"><span class="type-signature">&lt;inner> </span>xmlNewElement<span class="signature">(dom, namespaceURI, qualifiedName, <span class="optional">children</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Creates a new DOM element node.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>dom</code></td>
<td class="type">
</td>
<td class="attributes">
</td>
<td class="description last">DOM document used to create the DOM element.</td>
</tr>
<tr>
<td class="name"><code>namespaceURI</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="description last">Namespace URI of the new DOM element.</td>
</tr>
<tr>
<td class="name"><code>qualifiedName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>