<h1>xercesc::DOMNode Class Reference</h1><!-- doxytag: class="xercesc::DOMNode" -->The <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> interface is the primary datatype for the entire Document Object Model.
Inheritance diagram for xercesc::DOMNode:<p><center><imgsrc="classxercesc_1_1DOMNode__inherit__graph.png"border="0"usemap="#xercesc_1_1DOMNode__inherit__map"alt="Inheritance graph"></center>
<center><fontsize="2">[<ahref="graph_legend.html">legend</a>]</font></center><ahref="classxercesc_1_1DOMNode-members.html">List of all members.</a><tableborder="0"cellpadding="0"cellspacing="0">
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">The name of this node, depending on its type; see the table above. <ahref="#7b32344fcf1bc6750237d0d136e669c5"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the value of this node, depending on its type. <ahref="#91c52c0624325ac9c9e176e944c2e179"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">An enum value representing the type of the underlying object. <ahref="#c124f43f7d0be0c82d5bdbe4ff2d5299"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets a <code>DOMNodeList</code> that contains all children of this node. <ahref="#5606d1504a6e5e34b8323c9c03bf0871"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the first child of this node. <ahref="#2332c89f39231890e5124b45b7576fea"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the last child of this node. <ahref="#5105b148ca44c2e0560559410bde6f28"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the node immediately preceding this node. <ahref="#9b331b808c3bca80b262a2a4b5ae3039"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the node immediately following this node. <ahref="#15122c1270fbb4e49e3278600fc3e92f"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets a <code>DOMNamedNodeMap</code> containing the attributes of this node (if it is an <code>DOMElement</code>) or <code>null</code> otherwise. <ahref="#94cba44e801d6ef597d6158d08a8db4b"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> object associated with this node. <ahref="#678751c64acb0ba5ffdd80695b1bc357"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns a duplicate of this node. <ahref="#cbd55c7876782a2147b092416609055d"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Inserts the node <code>newChild</code> before the existing child node <code>refChild</code>. <ahref="#b53ebbb7276d3d20d24cb486f948717c"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Replaces the child node <code>oldChild</code> with <code>newChild</code> in the list of children, and returns the <code>oldChild</code> node. <ahref="#94ce2693cd6634ac744ef6c3ed0609c0"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Removes the child node indicated by <code>oldChild</code> from the list of children, and returns it. <ahref="#6d55c029576075e0cfd8fc26f48c8b84"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Adds the node <code>newChild</code> to the end of the list of children of this node. <ahref="#de4f6d57748def70f0444b004df96a94"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">This is a convenience method to allow easy determination of whether a node has any children. <ahref="#2bc565b40dd4bb5aba845d9dd2c7583a"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Puts all <code>DOMText</code> nodes in the full depth of the sub-tree underneath this <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code>, including attribute nodes, into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates <code>DOMText</code> nodes, i.e., there are neither adjacent <code>DOMText</code> nodes nor empty <code>DOMText</code> nodes. <ahref="#98d4e1ca99342ae7fa64ffcb1731b1e9"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Tests whether the DOM implementation implements a specific feature and that feature is supported by this node. <ahref="#1c65320f33cec3065797a0e9b3cdcacd"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get the <em>namespace URI</em> of this node, or <code>null</code> if it is unspecified. <ahref="#f35cfa2da40fa282118ec1aca93fc306"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get the <em>namespace prefix</em> of this node, or <code>null</code> if it is unspecified. <ahref="#d1f609ef0a7ebd5d4467e83940f9d085"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns the local part of the <em>qualified name</em> of this node. <ahref="#5d459b8e9f1fe8cc82f3690d71d9d98e"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Set the <em>namespace prefix</em> of this node. <ahref="#ded63bdb02c190b1a6136c8a7deafcd8"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether this node (if it is an element) has any attributes. <ahref="#9857bb0538097f155821e5831fe6326b"></a><br></td></tr>
<tr><tdcolspan="2"><divclass="groupHeader">Functions introduced in DOM Level 3.</div></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Returns whether this node is the same node as the given one. <ahref="#439002778f99343aba9298d7b0f712c4"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Tests whether two nodes are equal. <ahref="#e7e8ea1540b43fc6f73a2595dc45cfce"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Associate an object to a key on this node. <ahref="#f1b188358a3cbb7b44a24fc71425bf42"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Retrieves the object associated to a key on a this node. <ahref="#f9d881c5e6a25c61732060dc6c6955ea"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">The absolute base URI of this node or <code>null</code> if undefined. <ahref="#f775e8a5faa128e2b7d301b29d285192"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Compares a node with this node with regard to their position in the tree and according to the document order. <ahref="#ce1263b9eb39ed8d43e38edc8953467e"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">This attribute returns the text content of this node and its descendants. <ahref="#fbc6510ae34920edb171bc1b7499e2fd"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">This attribute removes any possible children this node may have and, if the new string is not empty or null, replaced by a single <code>DOMText</code> node containing the string this attribute is set to. <ahref="#5b9b83d624c3d85e7ad8d4f30e9a8bb4"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Look up the prefix associated to the given namespace URI, starting from this node. <ahref="#4d853cdaff1ce25af8ca592fb333baab"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">This method checks if the specified <code>namespaceURI</code> is the default namespace or not. <ahref="#97bd8a011432b6bb97152cfed2984d9e"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Look up the namespace URI associated to the given prefix, starting from this node. <ahref="#ff70b3729ab0030f559b1c0bf9d5196e"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">This method makes available a <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code>'s specialized interface. <ahref="#dc6547eb5874a78bdb32ced41b545de1"></a><br></td></tr>
<tr><tdclass="mdescLeft"> </td><tdclass="mdescRight">Called to indicate that this <aclass="el"href="classNode.html">Node</a> (and its associated children) is no longer in use and that the implementation may relinquish any resources associated with it and its associated children. <ahref="#0618f7ce0796d8c35ede74882a93dae1"></a><br></td></tr>
<tr><tdcolspan="2"><br><h2>Protected Member Functions</h2></td></tr>
The <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> interface is the primary datatype for the entire Document Object Model.
<p>
It represents a single node in the document tree. While all objects implementing the <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> interface expose methods for dealing with children, not all objects implementing the <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> interface may have children. For example, <code>DOMText</code> nodes may not have children, and adding children to such nodes results in a <code>DOMException</code> being raised. <p>
The attributes <code>nodeName</code>, <code>nodeValue</code> and <code>attributes</code> are included as a mechanism to get at node information without casting down to the specific derived interface. In cases where there is no obvious mapping of these attributes for a specific <code>nodeType</code> (e.g., <code>nodeValue</code> for an <code>DOMElement</code> or <code>attributes</code> for a <code>DOMComment</code> ), this returns <code>null</code>. Note that the specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant information. <p>
The values of <code>nodeName</code>, <code>nodeValue</code>, and <code>attributes</code> vary according to the node type as follows: <tableborder="1"cellspacing="3"cellpadding="3">
<tdvalign="top"rowspan="1"colspan="1">DOMAttr </td><tdvalign="top"rowspan="1"colspan="1">name of attribute </td><tdvalign="top"rowspan="1"colspan="1">value of attribute </td><tdvalign="top"rowspan="1"colspan="1">null </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1">DOMCDATASection </td><tdvalign="top"rowspan="1"colspan="1">"cdata-section" </td><tdvalign="top"rowspan="1"colspan="1">content of the CDATA Section </td><tdvalign="top"rowspan="1"colspan="1">null </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1">DOMComment </td><tdvalign="top"rowspan="1"colspan="1">"comment" </td><tdvalign="top"rowspan="1"colspan="1">content of the comment </td><tdvalign="top"rowspan="1"colspan="1">null </td></tr>
<tdvalign="top"rowspan="1"colspan="1">DOMDocumentType </td><tdvalign="top"rowspan="1"colspan="1">document type name </td><tdvalign="top"rowspan="1"colspan="1">null </td><tdvalign="top"rowspan="1"colspan="1">null </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1">DOMElement </td><tdvalign="top"rowspan="1"colspan="1">tag name </td><tdvalign="top"rowspan="1"colspan="1">null </td><tdvalign="top"rowspan="1"colspan="1">NamedNodeMap </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1">DOMEntity </td><tdvalign="top"rowspan="1"colspan="1">entity name </td><tdvalign="top"rowspan="1"colspan="1">null </td><tdvalign="top"rowspan="1"colspan="1">null </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1">DOMEntityReference </td><tdvalign="top"rowspan="1"colspan="1">name of entity referenced </td><tdvalign="top"rowspan="1"colspan="1">null </td><tdvalign="top"rowspan="1"colspan="1">null </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1">DOMNotation </td><tdvalign="top"rowspan="1"colspan="1">notation name </td><tdvalign="top"rowspan="1"colspan="1">null </td><tdvalign="top"rowspan="1"colspan="1">null </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1">DOMProcessingInstruction </td><tdvalign="top"rowspan="1"colspan="1">target </td><tdvalign="top"rowspan="1"colspan="1">entire content excluding the target </td><tdvalign="top"rowspan="1"colspan="1">null </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1">DOMText </td><tdvalign="top"rowspan="1"colspan="1">"text" </td><tdvalign="top"rowspan="1"colspan="1">content of the text node </td><tdvalign="top"rowspan="1"colspan="1">null </td></tr>
</table>
<p>
See also the <ahref="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113">Document Object Model (DOM) Level 2 Core Specification</a>.<p>
<code>TREE_POSITION_PRECEDING:</code> The node precedes the reference node. <p>
<code>TREE_POSITION_FOLLOWING:</code> The node follows the reference node. <p>
<code>TREE_POSITION_ANCESTOR:</code> The node is an ancestor of the reference node. <p>
<code>TREE_POSITION_DESCENDANT:</code> The node is a descendant of the reference node. <p>
<code>TREE_POSITION_EQUIVALENT:</code> The two nodes have an equivalent position. This is the case of two attributes that have the same <code>ownerElement</code>, and two nodes that are the same. <p>
<code>TREE_POSITION_SAME_NODE:</code> The two nodes are the same. Two nodes that are the same have an equivalent position, though the reverse may not be true. <p>
<code>TREE_POSITION_DISCONNECTED:</code> The two nodes are disconnected, they do not have any common ancestor. This is the case of two nodes that are not in the same document.<p>
Adds the node <code>newChild</code> to the end of the list of children of this node.
<p>
If the <code>newChild</code> is already in the tree, it is first removed. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>newChild</em> </td><td>The node to add.If it is a <code>DOMDocumentFragment</code> object, the entire contents of the document fragment are moved into the child list of this node </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>DOMException</em> </td><td>HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the <code>newChild</code> node, or if the node to append is one of this node's ancestors. <br>
WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created from a different document than the one that created this node. <br>
NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the node being appended is readonly. </td></tr>
This function serves as a generic copy constructor for nodes.<p>
The duplicate node has no parent ( <code>parentNode</code> returns <code>null</code>.). <br>
Cloning an <code>DOMElement</code> copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child <code>DOMText</code> node. Cloning any other type of node simply returns a copy of this node. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>deep</em> </td><td>If <code>true</code>, recursively clone the subtree under the specified node; if <code>false</code>, clone only the node itself (and its attributes, if it is an <code>DOMElement</code>). </td></tr>
The absolute base URI of this node or <code>null</code> if undefined.
<p>
This value is computed according to . However, when the <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> supports the feature "HTML" , the base URI is computed using first the value of the href attribute of the HTML BASE element if any, and the value of the <code>documentURI</code> attribute from the <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> interface otherwise.<p>
<b>"Experimental - subject to change"</b><p>
<br>
When the node is an <code>DOMElement</code>, a <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> or a a <code>DOMProcessingInstruction</code>, this attribute represents the properties [base URI] defined in . When the node is a <code>DOMNotation</code>, an <code>DOMEntity</code>, or an <code>DOMEntityReference</code>, this attribute represents the properties [declaration base URI]. <dlcompact><dt><b>Since:</b></dt><dd>DOM Level 3 </dd></dl>
Gets a <code>DOMNodeList</code> that contains all children of this node.
<p>
If there are no children, this is a <code>DOMNodeList</code> containing no nodes. The content of the returned <code>DOMNodeList</code> is "live" in the sense that, for instance, changes to the children of the node object that it was created from are immediately reflected in the nodes returned by the <code>DOMNodeList</code> accessors; it is not a static snapshot of the content of the node. This is true for every <code>DOMNodeList</code>, including the ones returned by the <code>getElementsByTagName</code> method. <dlcompact><dt><b>Since:</b></dt><dd>DOM Level 1 </dd></dl>
This method makes available a <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code>'s specialized interface.
<p>
<b>"Experimental - subject to change"</b><p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>feature</em> </td><td>The name of the feature requested (case-insensitive). </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>Returns an alternate <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> which implements the specialized APIs of the specified feature, if any, or <code>null</code> if there is no alternate <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> which implements interfaces associated with that feature. Any alternate <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> returned by this method must delegate to the primary core <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> and not return results inconsistent with the primary core <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> such as <code>key</code>, <code>attributes</code>, <code>childNodes</code>, etc. </dd></dl>
Returns the local part of the <em>qualified name</em> of this node.
<p>
For nodes created with a DOM Level 1 method, such as <code>createElement</code> from the <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> interface, it is null.<p>
Get the <em>namespace URI</em> of this node, or <code>null</code> if it is unspecified.
<p>
This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time. <p>
For nodes of any type other than <code>ELEMENT_NODE</code> and <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1 method, such as <code>createElement</code> from the <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> interface, this is always <code>null</code>.<p>
Gets the <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> object associated with this node.
<p>
This is also the <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> object used to create new nodes. When this node is a <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> or a <code>DOMDocumentType</code> which is not used with any <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code> yet, this is <code>null</code>.<p>
All nodes, except <code><aclass="el"href="classxercesc_1_1DOMDocument.html">DOMDocument</a></code>, <code>DOMDocumentFragment</code>, and <code>DOMAttr</code> may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, a <code>null</code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a> is returned. <dlcompact><dt><b>Since:</b></dt><dd>DOM Level 1 </dd></dl>
This attribute returns the text content of this node and its descendants.
<p>
No serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed and the returned string does not contain the white spaces in element content.<p>
<b>"Experimental - subject to change"</b><p>
<br>
The string returned is made of the text content of this node depending on its type, as defined below: <tableborder="1"cellspacing="3"cellpadding="3">
<tr>
<td><aclass="el"href="classNode.html">Node</a> type </td><td>Content </td></tr>
<tr>
<tdvalign="top"rowspan="1"colspan="1">ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE </td><tdvalign="top"rowspan="1"colspan="1">concatenation of the <code>textContent</code> attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>DOMException</em> </td><td>DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a <code>DOMString</code> variable on the implementation platform. </td></tr>
Retrieves the object associated to a key on a this node.
<p>
The object must first have been set to this node by calling <code>setUserData</code> with the same key.<p>
<b>"Experimental - subject to change"</b><p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>key</em> </td><td>The key the object is associated to. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>Returns the <code>void*</code> associated to the given key on this node, or <code>null</code> if there was none. </dd></dl>
Inserts the node <code>newChild</code> before the existing child node <code>refChild</code>.
<p>
If <code>refChild</code> is <code>null</code>, insert <code>newChild</code> at the end of the list of children. <br>
If <code>newChild</code> is a <code>DOMDocumentFragment</code> object, all of its children are inserted, in the same order, before <code>refChild</code>. If the <code>newChild</code> is already in the tree, it is first removed. Note that a <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> that has never been assigned to refer to an actual node is == null. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>newChild</em> </td><td>The node to insert. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>refChild</em> </td><td>The reference node, i.e., the node before which the new node must be inserted. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>The node being inserted. </dd></dl>
<dlcompact><dt><b>Exceptions:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>DOMException</em> </td><td>HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the <code>newChild</code> node, or if the node to insert is one of this node's ancestors. <br>
WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created from a different document than the one that created this node. <br>
NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the node being inserted is readonly. <br>
NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of this node. </td></tr>
This method checks if the specified <code>namespaceURI</code> is the default namespace or not.
<p>
<b>"Experimental - subject to change"</b><p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>namespaceURI</em> </td><td>The namespace URI to look for. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd><code>true</code> if the specified <code>namespaceURI</code> is the default namespace, <code>false</code> otherwise. </dd></dl>
This method tests for equality of nodes, not sameness (i.e., whether the two nodes are pointers to the same object) which can be tested with <code><aclass="el"href="classxercesc_1_1DOMNode.html#439002778f99343aba9298d7b0f712c4">DOMNode::isSameNode</a></code>. All nodes that are the same will also be equal, though the reverse may not be true. <br>
Two nodes are equal if and only if the following conditions are satisfied: The two nodes are of the same type.The following string attributes are equal: <code>nodeName</code>, <code>localName</code>, <code>namespaceURI</code>, <code>prefix</code>, <code>nodeValue</code> , <code>baseURI</code>. This is: they are both <code>null</code>, or they have the same length and are character for character identical. The <code>attributes</code><code>DOMNamedNodeMaps</code> are equal. This is: they are both <code>null</code>, or they have the same length and for each node that exists in one map there is a node that exists in the other map and is equal, although not necessarily at the same index.The <code>childNodes</code><code>DOMNodeLists</code> are equal. This is: they are both <code>null</code>, or they have the same length and contain equal nodes at the same index. This is true for <code>DOMAttr</code> nodes as for any other type of node. Note that normalization can affect equality; to avoid this, nodes should be normalized before being compared. <br>
For two <code>DOMDocumentType</code> nodes to be equal, the following conditions must also be satisfied: The following string attributes are equal: <code>publicId</code>, <code>systemId</code>, <code>internalSubset</code>.The <code>entities</code><code>DOMNamedNodeMaps</code> are equal.The <code>notations</code><code>DOMNamedNodeMaps</code> are equal. <br>
On the other hand, the following do not affect equality: the <code>ownerDocument</code> attribute, the <code>specified</code> attribute for <code>DOMAttr</code> nodes, the <code>isWhitespaceInElementContent</code> attribute for <code>DOMText</code> nodes, as well as any user data or event listeners registered on the nodes.<p>
<b>"Experimental - subject to change"</b><p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>arg</em> </td><td>The node to compare equality with. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>If the nodes, and possibly subtrees are equal, <code>true</code> otherwise <code>false</code>. </dd></dl>
Returns whether this node is the same node as the given one.
<p>
<br>
This method provides a way to determine whether two <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> references returned by the implementation reference the same object. When two <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code> references are references to the same object, even if through a proxy, the references may be used completely interchangeably, such that all attributes have the same values and calling the same DOM method on either reference always has exactly the same effect.<p>
<b>"Experimental - subject to change"</b><p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>other</em> </td><td>The node to test against. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>Returns <code>true</code> if the nodes are the same, <code>false</code> otherwise. </dd></dl>
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>feature</em> </td><td>The string of the feature to test. This is the same name as what can be passed to the method <code>hasFeature</code> on <code>DOMImplementation</code>. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>version</em> </td><td>This is the version number of the feature to test. In Level 2, version 1, this is the string "2.0". If the version is not specified, supporting any version of the feature will cause the method to return <code>true</code>. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>Returns <code>true</code> if the specified feature is supported on this node, <code>false</code> otherwise. </dd></dl>
Look up the prefix associated to the given namespace URI, starting from this node.
<p>
<b>"Experimental - subject to change"</b><p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>namespaceURI</em> </td><td>The namespace URI to look for. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>useDefault</em> </td><td>Indicates if the lookup mechanism should take into account the default namespace or not. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>Returns an associated namespace prefix if found, <code>null</code> if none is found and <code>useDefault</code> is false, or <code>null</code> if not found or it is the default namespace and <code>useDefault</code> is <code>true</code>. If more than one prefix are associated to the namespace prefix, the returned namespace prefix is implementation dependent. </dd></dl>
Look up the namespace URI associated to the given prefix, starting from this node.
<p>
<b>"Experimental - subject to change"</b><p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>prefix</em> </td><td>The prefix to look for. If this parameter is <code>null</code>, the method will return the default namespace URI if any. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>Returns the associated namespace URI or <code>null</code> if none is found. </dd></dl>
Puts all <code>DOMText</code> nodes in the full depth of the sub-tree underneath this <code><aclass="el"href="classxercesc_1_1DOMNode.html">DOMNode</a></code>, including attribute nodes, into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates <code>DOMText</code> nodes, i.e., there are neither adjacent <code>DOMText</code> nodes nor empty <code>DOMText</code> nodes.
<p>
This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used. <p>
<b>Note:</b> In cases where the document contains <code>DOMCDATASections</code>, the normalize operation alone may not be sufficient, since XPointers do not differentiate between <code>DOMText</code> nodes and <code>DOMCDATASection</code> nodes.<p>
Called to indicate that this <aclass="el"href="classNode.html">Node</a> (and its associated children) is no longer in use and that the implementation may relinquish any resources associated with it and its associated children.
<p>
If this is a document, any nodes it owns (created by DOMDocument::createXXXX()) are also released.<p>
Access to a released object will lead to unexpected result.<p>
<dlcompact><dt><b>Exceptions:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>DOMException</em> </td><td>INVALID_ACCESS_ERR: Raised if this <aclass="el"href="classNode.html">Node</a> has a parent and thus should not be released yet. </td></tr>
Replaces the child node <code>oldChild</code> with <code>newChild</code> in the list of children, and returns the <code>oldChild</code> node.
<p>
If <code>newChild</code> is a <code>DOMDocumentFragment</code> object, <code>oldChild</code> is replaced by all of the <code>DOMDocumentFragment</code> children, which are inserted in the same order.<p>
If the <code>newChild</code> is already in the tree, it is first removed. <dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>newChild</em> </td><td>The new node to put in the child list. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>oldChild</em> </td><td>The node being replaced in the list. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>DOMException</em> </td><td>HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the <code>newChild</code> node, or it the node to put in is one of this node's ancestors. <br>
WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created from a different document than the one that created this node. <br>
NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the new node is readonly. <br>
NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of this node. </td></tr>
Any node which can have a nodeValue will also accept requests to set it to a string. The exact response to this varies from node to node -- Attribute, for example, stores its values in its children and has to replace them with a new Text holding the replacement value.<p>
For most types of <aclass="el"href="classNode.html">Node</a>, value is null and attempting to set it will throw DOMException(NO_MODIFICATION_ALLOWED_ERR). This will also be thrown if the node is read-only. <dlcompact><dt><b>See also:</b></dt><dd><aclass="el"href="classxercesc_1_1DOMNode.html#91c52c0624325ac9c9e176e944c2e179">getNodeValue</a></dd></dl>
Note that setting this attribute, when permitted, changes the <code>nodeName</code> attribute, which holds the <em>qualified name</em>, as well as the <code>tagName</code> and <code>name</code> attributes of the <code>DOMElement</code> and <code>DOMAttr</code> interfaces, when applicable. <p>
Note also that changing the prefix of an attribute, that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the <code>namespaceURI</code> and <code>localName</code> do not change.<p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>prefix</em> </td><td>The prefix of this node. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Exceptions:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>DOMException</em> </td><td>INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character. <br>
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. <br>
NAMESPACE_ERR: Raised if the specified <code>prefix</code> is malformed, if the <code>namespaceURI</code> of this node is <code>null</code>, if the specified prefix is "xml" and the <code>namespaceURI</code> of this node is different from "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the <code>namespaceURI</code> of this node is different from "http://www.w3.org/2000/xmlns/", or if this node is an attribute and the <code>qualifiedName</code> of this node is "xmlns". </td></tr>
This attribute removes any possible children this node may have and, if the new string is not empty or null, replaced by a single <code>DOMText</code> node containing the string this attribute is set to.
<p>
No parsing is performed, the input string is taken as pure textual content.<p>
<b>"Experimental - subject to change"</b><p>
<dlcompact><dt><b>Exceptions:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>DOMException</em> </td><td>NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. </td></tr>
The object can later be retrieved from this node by calling <code>getUserData</code> with the same key.<p>
Deletion of the user data remains the responsibility of the application program; it will not be automatically deleted when the nodes themselves are reclaimed.<p>
Both the parameter <code>data</code> and the returned object are void pointer, it is applications' responsibility to keep track of their original type. Casting them to the wrong type may result unexpected behavior.<p>
<b>"Experimental - subject to change"</b><p>
<dlcompact><dt><b>Parameters:</b></dt><dd>
<tableborder="0"cellspacing="2"cellpadding="0">
<tr><tdvalign="top"></td><tdvalign="top"><em>key</em> </td><td>The key to associate the object to. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>data</em> </td><td>The object to associate to the given key, or <code>null</code> to remove any existing association to that key. </td></tr>
<tr><tdvalign="top"></td><tdvalign="top"><em>handler</em> </td><td>The handler to associate to that key, or <code>null</code>. </td></tr>
</table>
</dl>
<dlcompact><dt><b>Returns:</b></dt><dd>Returns the void* object previously associated to the given key on this node, or <code>null</code> if there was none. </dd></dl>