|  | 
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members 
 DOMNode  Class ReferenceTheDOMNodeinterface is the primary datatype for the entire Document Object Model. 
More...
Inheritance diagram for DOMNode:  [legend]List of all members. 
| 
 Public Types |  |  |  | enum | NodeType { ELEMENT_NODE =  1, 
ATTRIBUTE_NODE =  2, 
TEXT_NODE =  3, 
CDATA_SECTION_NODE =  4,
 ENTITY_REFERENCE_NODE =  5, 
ENTITY_NODE =  6, 
PROCESSING_INSTRUCTION_NODE =  7, 
COMMENT_NODE =  8,
 DOCUMENT_NODE =  9, 
DOCUMENT_TYPE_NODE =  10, 
DOCUMENT_FRAGMENT_NODE =  11, 
NOTATION_NODE =  12
 }
 |  |  | NodeType. More... 
 
 |  | enum | DOMTreePosition { TREE_POSITION_PRECEDING =  0x01, 
TREE_POSITION_FOLLOWING =  0x02, 
TREE_POSITION_ANCESTOR =  0x04, 
TREE_POSITION_DESCENDANT =  0x08,
 TREE_POSITION_EQUIVALENT =  0x10, 
TREE_POSITION_SAME_NODE =  0x20, 
TREE_POSITION_DISCONNECTED =  0x00
 }
 |  |  | TreePosition:. More... 
 
 |  | 
 Public Methods |  |  |  | virtual | ~DOMNode () |  |  | Destructor. More... 
 
 |  |  |  | virtual const XMLCh * | getNodeName () const=0 |  |  | The name of this node, depending on its type; see the table above. More... 
 
 |  | virtual const XMLCh * | getNodeValue () const=0 |  |  | Gets the value of this node, depending on its type. More... 
 
 |  | virtual short | getNodeType () const=0 |  |  | An enum value representing the type of the underlying object. More... 
 
 |  | virtual DOMNode * | getParentNode () const=0 |  |  | Gets the parent of this node. More... 
 
 |  | virtual DOMNodeList * | getChildNodes () const=0 |  |  | Gets a DOMNodeListthat contains all children of this node. More...
 
 |  | virtual DOMNode * | getFirstChild () const=0 |  |  | Gets the first child of this node. More... 
 
 |  | virtual DOMNode * | getLastChild () const=0 |  |  | Gets the last child of this node. More... 
 
 |  | virtual DOMNode * | getPreviousSibling () const=0 |  |  | Gets the node immediately preceding this node. More... 
 
 |  | virtual DOMNode * | getNextSibling () const=0 |  |  | Gets the node immediately following this node. More... 
 
 |  | virtual DOMNamedNodeMap * | getAttributes () const=0 |  |  | Gets a DOMNamedNodeMapcontaining the attributes of this node (if it is anDOMElement) ornullotherwise. More...
 
 |  | virtual DOMDocument * | getOwnerDocument () const=0 |  |  | Gets the DOMDocumentobject associated with this node. More...
 
 |  | virtual DOMNode * | cloneNode (bool deep) const=0 |  |  | Returns a duplicate of this node. More... 
 
 |  | virtual DOMNode * | insertBefore (DOMNode *newChild, DOMNode *refChild)=0 |  |  | Inserts the node newChildbefore the existing child noderefChild. More...
 
 |  | virtual DOMNode * | replaceChild (DOMNode *newChild, DOMNode *oldChild)=0 |  |  | Replaces the child node oldChildwithnewChildin the list of children, and returns theoldChildnode. More...
 
 |  | virtual DOMNode * | removeChild (DOMNode *oldChild)=0 |  |  | Removes the child node indicated by oldChildfrom the list of children, and returns it. More...
 
 |  | virtual DOMNode * | appendChild (DOMNode *newChild)=0 |  |  | Adds the node newChildto the end of the list of children of this node. More...
 
 |  | virtual bool | hasChildNodes () const=0 |  |  | This is a convenience method to allow easy determination of whether a node has any children. More... 
 
 |  | virtual void | setNodeValue (const XMLCh *nodeValue)=0 |  |  | Sets the value of the node. More... 
 
 |  |  |  | virtual void | normalize ()=0 |  |  | Puts all DOMTextnodes in the full depth of the sub-tree underneath thisDOMNode, including attribute nodes, into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separatesDOMTextnodes, i.e., there are neither adjacentDOMTextnodes nor emptyDOMTextnodes. More...
 
 |  | virtual bool | isSupported (const XMLCh *feature, const XMLCh *version) const=0 |  |  | Tests whether the DOM implementation implements a specific feature and that feature is supported by this node. More... 
 
 |  | virtual const XMLCh * | getNamespaceURI () const=0 |  |  | Get the namespace URI of this node, or nullif it is unspecified. More...
 
 |  | virtual const XMLCh * | getPrefix () const=0 |  |  | Get the namespace prefix of this node, or nullif it is unspecified. More...
 
 |  | virtual const XMLCh * | getLocalName () const=0 |  |  | Returns the local part of the qualified name of this node. More... 
 
 |  | virtual void | setPrefix (const XMLCh *prefix)=0 |  |  | Set the namespace prefix of this node. More... 
 
 |  | virtual bool | hasAttributes () const=0 |  |  | Returns whether this node (if it is an element) has any attributes. More... 
 
 |  |  |  | virtual bool | isSameNode (const DOMNode *other) const=0 |  |  | Returns whether this node is the same node as the given one. More... 
 
 |  | virtual bool | isEqualNode (const DOMNode *arg) const=0 |  |  | Tests whether two nodes are equal. More... 
 
 |  | virtual void * | setUserData (const XMLCh *key, void *data, DOMUserDataHandler *handler)=0 |  |  | Associate an object to a key on this node. More... 
 
 |  | virtual void * | getUserData (const XMLCh *key) const=0 |  |  | Retrieves the object associated to a key on a this node. More... 
 
 |  | virtual const XMLCh * | getBaseURI () const=0 |  |  | The absolute base URI of this node or nullif undefined. More...
 
 |  | virtual short | compareTreePosition (const DOMNode *other) const=0 |  |  | Compares a node with this node with regard to their position in the tree and according to the document order. More... 
 
 |  | virtual const XMLCh * | getTextContent () const=0 |  |  | This attribute returns the text content of this node and its descendants. More... 
 
 |  | virtual void | setTextContent (const XMLCh *textContent)=0 |  |  | This attribute returns the text content of this node and its descendants. More... 
 
 |  | virtual const XMLCh * | lookupNamespacePrefix (const XMLCh *namespaceURI, bool useDefault) const=0 |  |  | Look up the prefix associated to the given namespace URI, starting from this node. More... 
 
 |  | virtual bool | isDefaultNamespace (const XMLCh *namespaceURI) const=0 |  |  | This method checks if the specified namespaceURIis the default namespace or not. More...
 
 |  | virtual const XMLCh * | lookupNamespaceURI (const XMLCh *prefix) const=0 |  |  | Look up the namespace URI associated to the given prefix, starting from this node. More... 
 
 |  | virtual DOMNode * | getInterface (const XMLCh *feature)=0 |  |  | This method makes available a DOMNode's specialized interface. More...
 
 |  |  |  | virtual void | release ()=0 |  |  | Called to indicate that this Node (and its associated children) is no longer in use and that the implementation may relinquish any resources associated with it and its associated children. More... 
 
 |  | 
 Protected Methods |  |  |  |  | DOMNode () |  
 Detailed DescriptionTheDOMNodeinterface is the primary datatype for the entire Document Object Model.
It represents a single node in the document tree. While all objects implementing the DOMNodeinterface expose methods for dealing with children, not all objects implementing theDOMNodeinterface may have children. For example,DOMTextnodes may not have children, and adding children to such nodes results in aDOMExceptionbeing raised. 
The attributes nodeName,nodeValueandattributesare 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 specificnodeType(e.g.,nodeValuefor anDOMElementorattributesfor aDOMComment), this returnsnull. Note that the specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant information. 
The values of nodeName,nodeValue, andattributesvary according to the node type as follows: 
See also the Document Object Model (DOM) Level 2 Core Specification.
 
 
Since: 
DOM Level 1 
 
 
 Member Enumeration Documentation
 
  
    | 
        
          | enum DOMNode::DOMTreePosition |  |  
  
    |  | 
TreePosition:.
 
 
"Experimental - subject to change"
 
 
TREE_POSITION_PRECEDING:The node precedes the reference node. 
TREE_POSITION_FOLLOWING:The node follows the reference node. 
TREE_POSITION_ANCESTOR:The node is an ancestor of the reference node. 
TREE_POSITION_DESCENDANT:The node is a descendant of the reference node. 
TREE_POSITION_EQUIVALENT:The two nodes have an equivalent position. This is the case of two attributes that have the sameownerElement, and two nodes that are the same. 
TREE_POSITION_SAME_NODE:The two nodes are the same. Two nodes that are the same have an equivalent position, though the reverse may not be true. 
TREE_POSITION_DISCONNECTED: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. 
 
Since: 
DOM Level 3 
 
Enumeration values:
| TREE_POSITION_PRECEDING |  |  | TREE_POSITION_FOLLOWING |  |  | TREE_POSITION_ANCESTOR |  |  | TREE_POSITION_DESCENDANT |  |  | TREE_POSITION_EQUIVALENT |  |  | TREE_POSITION_SAME_NODE |  |  | TREE_POSITION_DISCONNECTED |  | 
 |  
 
  
    |  | 
NodeType.
 
 
Since: 
DOM Level 1 
 
Enumeration values:
| ELEMENT_NODE |  |  | ATTRIBUTE_NODE |  |  | TEXT_NODE |  |  | CDATA_SECTION_NODE |  |  | ENTITY_REFERENCE_NODE |  |  | ENTITY_NODE |  |  | PROCESSING_INSTRUCTION_NODE |  |  | COMMENT_NODE |  |  | DOCUMENT_NODE |  |  | DOCUMENT_TYPE_NODE |  |  | DOCUMENT_FRAGMENT_NODE |  |  | NOTATION_NODE |  | 
 |  
 Constructor & Destructor Documentation
 
  
    | 
        
          | DOMNode::DOMNode | ( |  | ) |  [protected] |  |  
 
  
    | 
        
          | virtual DOMNode::~DOMNode | ( |  | ) |  [virtual] |  |  
 Member Function Documentation
 
  
    | 
        
          | virtual DOMNode* DOMNode::appendChild | ( | DOMNode * | newChild | ) |  [pure virtual] |  |  
  
    |  | 
Adds the node newChildto the end of the list of children of this node. 
If the newChildis already in the tree, it is first removed. 
Parameters: 
| newChild | The node to add.If it is a DOMDocumentFragmentobject, the entire contents of the document fragment are moved into the child list of this node | 
 
Returns: 
The node added. 
 
Exceptions: 
| DOMException | HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChildnode, or if the node to append is one of this node's ancestors.WRONG_DOCUMENT_ERR: Raised if
 newChildwas created from a different document than the one that created this node.NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the node being appended is readonly.
 | 
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::cloneNode | ( | bool | deep | ) | const  [pure virtual] |  |  
  
    |  | 
Returns a duplicate of this node.
 
This function serves as a generic copy constructor for nodes.
 
The duplicate node has no parent ( parentNodereturnsnull.).Cloning an
 DOMElementcopies 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 childDOMTextnode. Cloning any other type of node simply returns a copy of this node. 
Parameters: 
| deep | If true, recursively clone the subtree under the specified node; iffalse, clone only the node itself (and its attributes, if it is anDOMElement). | 
 
Returns: 
The duplicate node. 
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual short DOMNode::compareTreePosition | ( | const DOMNode * | other | ) | const  [pure virtual] |  |  
  
    |  | 
Compares a node with this node with regard to their position in the tree and according to the document order.
 
This order can be extended by module that define additional types of nodes.
 
 
"Experimental - subject to change" 
Parameters: 
| other | The node to compare against this node. | 
 
Returns: 
Returns how the given node is positioned relatively to this node. 
 
Since: 
DOM Level 3 
 |  
 
 
  
    | 
        
          | virtual const XMLCh* DOMNode::getBaseURI | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
The absolute base URI of this node or nullif undefined. 
This value is computed according to . However, when the DOMDocumentsupports 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 thedocumentURIattribute from theDOMDocumentinterface otherwise. 
 
"Experimental - subject to change"
 
When the node is an
 DOMElement, aDOMDocumentor a aDOMProcessingInstruction, this attribute represents the properties [base URI] defined in . When the node is aDOMNotation, anDOMEntity, or anDOMEntityReference, this attribute represents the properties [declaration base URI]. 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual DOMNodeList* DOMNode::getChildNodes | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Gets a DOMNodeListthat contains all children of this node. 
If there are no children, this is a DOMNodeListcontaining no nodes. The content of the returnedDOMNodeListis "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 theDOMNodeListaccessors; it is not a static snapshot of the content of the node. This is true for everyDOMNodeList, including the ones returned by thegetElementsByTagNamemethod. 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::getFirstChild | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Gets the first child of this node.
 
If there is no such node, this returns null. 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::getInterface | ( | const XMLCh * | feature | ) |  [pure virtual] |  |  
  
    |  | 
This method makes available a DOMNode's specialized interface. 
 
"Experimental - subject to change" 
Parameters: 
| feature | The name of the feature requested (case-insensitive). | 
 
Returns: 
Returns an alternate DOMNodewhich implements the specialized APIs of the specified feature, if any, ornullif there is no alternateDOMNodewhich implements interfaces associated with that feature. Any alternateDOMNodereturned by this method must delegate to the primary coreDOMNodeand not return results inconsistent with the primary coreDOMNodesuch askey,attributes,childNodes, etc.
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::getLastChild | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Gets the last child of this node.
 
If there is no such node, this returns null. 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual const XMLCh* DOMNode::getLocalName | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Returns the local part of the qualified name of this node.
 
 
 For nodes created with a DOM Level 1 method, such as createElementfrom theDOMDocumentinterface, it is null. 
 
Since: 
DOM Level 2 
 |  
 
  
    | 
        
          | virtual const XMLCh* DOMNode::getNamespaceURI | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Get the namespace URI of this node, or nullif it is unspecified. 
 
 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. 
 
 For nodes of any type other than ELEMENT_NODEandATTRIBUTE_NODEand nodes created with a DOM Level 1 method, such ascreateElementfrom theDOMDocumentinterface, this is alwaysnull. 
 
Since: 
DOM Level 2 
 |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::getNextSibling | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Gets the node immediately following this node.
 
If there is no such node, this returns null. 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual const XMLCh* DOMNode::getNodeName | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
The name of this node, depending on its type; see the table above.
 
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual short DOMNode::getNodeType | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
An enum value representing the type of the underlying object.
 
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual const XMLCh* DOMNode::getNodeValue | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Gets the value of this node, depending on its type.
 
 
Exceptions: 
| DOMException | NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. | 
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual DOMDocument* DOMNode::getOwnerDocument | ( |  | ) | const  [pure virtual] |  |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::getParentNode | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Gets the parent of this node.
 
All nodes, except DOMDocument,DOMDocumentFragment, andDOMAttrmay 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, anullDOMNode is returned. 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual const XMLCh* DOMNode::getPrefix | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Get the namespace prefix of this node, or nullif it is unspecified. 
 
Since: 
DOM Level 2 
 |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::getPreviousSibling | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Gets the node immediately preceding this node.
 
If there is no such node, this returns null. 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual const XMLCh* DOMNode::getTextContent | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
This attribute returns the text content of this node and its descendants.
 
When it is defined to be null, setting it has no effect. When set, any possible children this node may have are removed and replaced by a single DOMTextnode containing the string this attribute is set to. On getting, no serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed, the returned string does not contain the element content whitespaces . Similarly, on setting, no parsing is performed either, the input string is taken as pure textual content. 
 
"Experimental - subject to change"
 
The string returned is made of the text content of this node depending on its type, as defined below:   <th>Node type</th> <th>Content</th>
 
| ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE | concatenation of the textContentattribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes |  | ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE | nodeValue |  | DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE | null |  
Exceptions: 
| DOMException | NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. |  | DOMException | DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMStringvariable on the implementation platform. | 
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual void* DOMNode::getUserData | ( | const XMLCh * | key | ) | const  [pure virtual] |  |  
  
    |  | 
Retrieves the object associated to a key on a this node.
 
The object must first have been set to this node by calling setUserDatawith the same key. 
 
"Experimental - subject to change" 
Parameters: 
| key | The key the object is associated to. | 
 
Returns: 
Returns the void*associated to the given key on this node, ornullif there was none.
 
See also: 
setUserData 
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual bool DOMNode::hasAttributes | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
Returns whether this node (if it is an element) has any attributes.
 
 
Returns: 
trueif this node has any attributes,falseotherwise.
 
Since: 
DOM Level 2 
 |  
 
  
    | 
        
          | virtual bool DOMNode::hasChildNodes | ( |  | ) | const  [pure virtual] |  |  
  
    |  | 
This is a convenience method to allow easy determination of whether a node has any children.
 
 
Returns: 
trueif the node has any children,falseif the node has no children.
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::insertBefore | ( | DOMNode * | newChild, |  
          |  |  | DOMNode * | refChild |  
          |  | ) |  [pure virtual] |  |  
  
    |  | 
Inserts the node newChildbefore the existing child noderefChild. 
If refChildisnull, insertnewChildat the end of the list of children.If
 newChildis aDOMDocumentFragmentobject, all of its children are inserted, in the same order, beforerefChild. If thenewChildis already in the tree, it is first removed. Note that aDOMNodethat has never been assigned to refer to an actual node is == null. 
Parameters: 
| newChild | The node to insert. |  | refChild | The reference node, i.e., the node before which the new node must be inserted. | 
 
Returns: 
The node being inserted. 
 
Exceptions: 
| DOMException | HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChildnode, or if the node to insert is one of this node's ancestors.WRONG_DOCUMENT_ERR: Raised if
 newChildwas created from a different document than the one that created this node.NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the node being inserted is readonly.
 NOT_FOUND_ERR: Raised if
 refChildis not a child of this node. | 
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual bool DOMNode::isDefaultNamespace | ( | const XMLCh * | namespaceURI | ) | const  [pure virtual] |  |  
  
    |  | 
This method checks if the specified namespaceURIis the default namespace or not. 
 
"Experimental - subject to change" 
Parameters: 
| namespaceURI | The namespace URI to look for. | 
 
Returns: 
trueif the specifiednamespaceURIis the default namespace,falseotherwise.
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual bool DOMNode::isEqualNode | ( | const DOMNode * | arg | ) | const  [pure virtual] |  |  
  
    |  | 
Tests whether two nodes are equal.
 
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
 DOMNode::isSameNode. All nodes that are the same will also be equal, though the reverse may not be true.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:
 nodeName,localName,namespaceURI,prefix,nodeValue,baseURI. This is: they are bothnull, or they have the same length and are character for character identical. TheattributesDOMNamedNodeMapsare equal. This is: they are bothnull, 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.ThechildNodesDOMNodeListsare equal. This is: they are bothnull, or they have the same length and contain equal nodes at the same index. This is true forDOMAttrnodes as for any other type of node. Note that normalization can affect equality; to avoid this, nodes should be normalized before being compared.For two
 DOMDocumentTypenodes to be equal, the following conditions must also be satisfied: The following string attributes are equal:publicId,systemId,internalSubset.TheentitiesDOMNamedNodeMapsare equal.ThenotationsDOMNamedNodeMapsare equal.On the other hand, the following do not affect equality: the
 ownerDocumentattribute, thespecifiedattribute forDOMAttrnodes, theisWhitespaceInElementContentattribute forDOMTextnodes, as well as any user data or event listeners registered on the nodes. 
 
"Experimental - subject to change" 
Parameters: 
| arg | The node to compare equality with. | 
 
Returns: 
If the nodes, and possibly subtrees are equal, trueotherwisefalse.
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual bool DOMNode::isSameNode | ( | const DOMNode * | other | ) | const  [pure virtual] |  |  
  
    |  | 
Returns whether this node is the same node as the given one.
 
This method provides a way to determine whether two
 DOMNodereferences returned by the implementation reference the same object. When twoDOMNodereferences 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. 
 
"Experimental - subject to change" 
Parameters: 
| other | The node to test against. | 
 
Returns: 
Returns trueif the nodes are the same,falseotherwise.
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual bool DOMNode::isSupported | ( | const XMLCh * | feature, |  
          |  |  | const XMLCh * | version |  
          |  | ) | const  [pure virtual] |  |  
  
    |  | 
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
 
 
Parameters: 
| feature | The string of the feature to test. This is the same name as what can be passed to the method hasFeatureonDOMImplementation. |  | version | 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 true. | 
 
Returns: 
Returns trueif the specified feature is supported on this node,falseotherwise.
 
Since: 
DOM Level 2 
 |  
 
  
    | 
        
          | virtual const XMLCh* DOMNode::lookupNamespacePrefix | ( | const XMLCh * | namespaceURI, |  
          |  |  | bool | useDefault |  
          |  | ) | const  [pure virtual] |  |  
  
    |  | 
Look up the prefix associated to the given namespace URI, starting from this node.
 
 
"Experimental - subject to change" 
Parameters: 
| namespaceURI | The namespace URI to look for. |  | useDefault | Indicates if the lookup mechanism should take into account the default namespace or not. | 
 
Returns: 
Returns an associated namespace prefix if found, nullif none is found anduseDefaultis false, ornullif not found or it is the default namespace anduseDefaultistrue. If more than one prefix are associated to the namespace prefix, the returned namespace prefix is implementation dependent.
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual const XMLCh* DOMNode::lookupNamespaceURI | ( | const XMLCh * | prefix | ) | const  [pure virtual] |  |  
  
    |  | 
Look up the namespace URI associated to the given prefix, starting from this node.
 
 
"Experimental - subject to change" 
Parameters: 
| prefix | The prefix to look for. If this parameter is null, the method will return the default namespace URI if any. | 
 
Returns: 
Returns the associated namespace URI or nullif none is found.
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual void DOMNode::normalize | ( |  | ) |  [pure virtual] |  |  
  
    |  | 
Puts all DOMTextnodes in the full depth of the sub-tree underneath thisDOMNode, including attribute nodes, into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separatesDOMTextnodes, i.e., there are neither adjacentDOMTextnodes nor emptyDOMTextnodes. 
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. 
 
Note: In cases where the document contains DOMCDATASections, the normalize operation alone may not be sufficient, since XPointers do not differentiate betweenDOMTextnodes andDOMCDATASectionnodes. 
 
Since: 
DOM Level 2 
 |  
 
  
    | 
        
          | virtual void DOMNode::release | ( |  | ) |  [pure virtual] |  |  
  
    |  | 
Called to indicate that this Node (and its associated children) is no longer in use and that the implementation may relinquish any resources associated with it and its associated children.
 
If this is a document, any nodes it owns (created by DOMDocument::createXXXX()) are also released.
 
Access to a released object will lead to unexpected result. 
Exceptions: 
| DOMException | INVALID_ACCESS_ERR: Raised if this Node has a parent and thus should not be released yet. | 
 |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::removeChild | ( | DOMNode * | oldChild | ) |  [pure virtual] |  |  
  
    |  | 
Removes the child node indicated by oldChildfrom the list of children, and returns it. 
 
Parameters: 
| oldChild | The node being removed. | 
 
Returns: 
The node removed. 
 
Exceptions: 
| DOMException | NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. NOT_FOUND_ERR: Raised if
 oldChildis not a child of this node. | 
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual DOMNode* DOMNode::replaceChild | ( | DOMNode * | newChild, |  
          |  |  | DOMNode * | oldChild |  
          |  | ) |  [pure virtual] |  |  
  
    |  | 
Replaces the child node oldChildwithnewChildin the list of children, and returns theoldChildnode. 
If newChildis aDOMDocumentFragmentobject,oldChildis replaced by all of theDOMDocumentFragmentchildren, which are inserted in the same order. 
If the newChildis already in the tree, it is first removed. 
Parameters: 
| newChild | The new node to put in the child list. |  | oldChild | The node being replaced in the list. | 
 
Returns: 
The node replaced. 
 
Exceptions: 
| DOMException | HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChildnode, or it the node to put in is one of this node's ancestors.WRONG_DOCUMENT_ERR: Raised if
 newChildwas created from a different document than the one that created this node.NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the new node is readonly.
 NOT_FOUND_ERR: Raised if
 oldChildis not a child of this node. | 
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual void DOMNode::setNodeValue | ( | const XMLCh * | nodeValue | ) |  [pure virtual] |  |  
  
    |  | 
Sets the value of the node.
 
Any node which can have a nodeValue ( For most types of Node, 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.
See also: 
getNodeValue) 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.
 
Since: 
DOM Level 1 
 |  
 
  
    | 
        
          | virtual void DOMNode::setPrefix | ( | const XMLCh * | prefix | ) |  [pure virtual] |  |  
  
    |  | 
Set the namespace prefix of this node.
 
 
 Note that setting this attribute, when permitted, changes the nodeNameattribute, which holds the qualified name, as well as thetagNameandnameattributes of theDOMElementandDOMAttrinterfaces, when applicable. 
 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 namespaceURIandlocalNamedo not change. 
Parameters: 
| prefix | The prefix of this node. | 
 
Exceptions: 
| DOMException | INVALID_CHARACTER_ERR: Raised if the specified prefix contains an illegal character. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
 NAMESPACE_ERR: Raised if the specified
 prefixis malformed, if thenamespaceURIof this node isnull, if the specified prefix is "xml" and thenamespaceURIof 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 thenamespaceURIof this node is different from "http://www.w3.org/2000/xmlns/", or if this node is an attribute and thequalifiedNameof this node is "xmlns". | 
 
Since: 
DOM Level 2 
 |  
 
  
    | 
        
          | virtual void DOMNode::setTextContent | ( | const XMLCh * | textContent | ) |  [pure virtual] |  |  
  
    |  | 
This attribute returns the text content of this node and its descendants.
 
When it is defined to be null, setting it has no effect. When set, any possible children this node may have are removed and replaced by a single DOMTextnode containing the string this attribute is set to. On getting, no serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed, the returned string does not contain the element content whitespaces . Similarly, on setting, no parsing is performed either, the input string is taken as pure textual content. 
 
"Experimental - subject to change"
 
The string returned is made of the text content of this node depending on its type, as defined below:   <th>Node type</th> <th>Content</th>
 
| ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE | concatenation of the textContentattribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes |  | ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE | nodeValue |  | DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE | null |  
Exceptions: 
| DOMException | NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. |  | DOMException | DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMStringvariable on the implementation platform. | 
 
Since: 
DOM Level 3 
 |  
 
  
    | 
        
          | virtual void* DOMNode::setUserData | ( | const XMLCh * | key, |  
          |  |  | void * | data, |  
          |  |  | DOMUserDataHandler * | handler |  
          |  | ) |  [pure virtual] |  |  
  
    |  | 
Associate an object to a key on this node.
 
The object can later be retrieved from this node by calling getUserDatawith the same key. 
Deletion of the user data remains the responsibility of the application program; it will not be automatically deleted when the nodes themselves are reclaimed.
 
Both the parameter dataand 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. 
 
"Experimental - subject to change" 
Parameters: 
| key | The key to associate the object to. |  | data | The object to associate to the given key, or nullto remove any existing association to that key. |  | handler | The handler to associate to that key, or null. | 
 
Returns: 
Returns the void* object previously associated to the given key on this node, or nullif there was none.
 
See also: 
getUserData
 
Since: 
DOM Level 3 
 |  The documentation for this class was generated from the following file:
 |