Home | All Classes | Grouped Classes | Index | Search
DOM Node class. More...
Derived from:
none
Derived by:
CL_DomAttr
CL_DomCharacterData
CL_DomDocument
CL_DomDocumentFragment
CL_DomDocumentType
CL_DomElement
CL_DomEntity
CL_DomEntityReference
CL_DomNotation
CL_DomProcessingInstruction
Group: Core (XML)
#include <ClanLib/core.h>
Construction:
Attributes:
Returns the node name. | |
Returns the node value. | |
Sets the node value. | |
Returns the node type (one of those in the NodeType enum). | |
Returns the parent of this node. | |
Returns a NodeList that contains all children of this node. | |
The first child of this node. | |
The last child of this node. | |
The node immediately preceding this node. | |
The node immediately following this node. | |
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise. | |
The Document object associated with this node. | |
Returns true if this is a null node. | |
Returns true if this is an element node. | |
Returns true if this is an attribute node. | |
Returns true if this is a text node. | |
Returns true if this is a CDATA section node. | |
Returns true if this is an entity reference node. | |
Returns true if this is an entity node. | |
Returns true if this is a processing instruction node. | |
Returns true if this is a comment node. | |
Returns true if this is a document node. | |
Returns true if this is a document type node. | |
Returns true if this is a document fragment node. | |
Returns true if this is a notation node. | |
Returns true if this node has any children. |
Operations:
Copy assignment operator. | |
Compare operator. | |
Inserts the node new_child before the existing child node ref_child. | |
Replaces the child node old_child with new_child in the list of children. | |
Removes the child node indicated by old_child from the list of children, and returns it. | |
Adds the node new_child to the end of the list of children of this node. | |
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. | |
Returns whether this node is the same node as the given one. | |
Returns the Element interface to this node. | |
Returns the Attribute interface to this node. | |
Returns the Text interface to this node. | |
Returns the CDATA Section interface to this node. | |
Returns the Entity Reference interface to this node. | |
Returns the Entity interface to this node. | |
Returns the Processing Instruction interface to this node. | |
Returns the Comment interface to this node. | |
Returns the Document interface to this node. | |
Returns the Document Type interface to this node. | |
Returns the Document Fragment interface to this node. | |
Returns the Notation interface to this node. | |
Returns the first child node with the specified node name. |
Implementation:
Detailed description:
!group=Core/XML! !header=core.h!The Node interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. While all objects implementing the Node interface expose methods for dealing with children, not all objects implementing the Node interface may have children. For example, Text nodes may not have children, and adding children to such nodes results in a CL_DOMException being thrown.
The attributes 'node_name', 'node_value' and 'attributes' 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 node_type (e.g., node_value for an Element or attributes for a Comment), this returns null. Note that the specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant information.