DOM Element class. More...
Derived from: | public CL_DomNode |
Derived by: | None |
Group: | XML (Core) |
#include <ClanLib/core.h>
Class Members:
Construction: | |
Constructs a DOM Element handle. |
| |
Returns the name of the element. |
| |
Returns true if the element has the specified attribute. | |
Returns true if the element has the specified attribute. | |
Returns the specified attribute. | |
Returns the specified attribute. | |
Adds a new attribute. | |
Removes an attribute by name. | |
Get attribute node. | |
Set attribute node. | |
Set attribute node ns. | |
Returns a NodeList of all descendant elements with a given tag name. | |
Returns the text of all child Text nodes appended together. | |
Returns the text value of the child node with the given tag name. | |
Returns the text value of the child node with the given local name and namespace. | |
Returns the integer value of the child node with the given tag name. | |
Returns the integer value of the child node with the given local name and namespace. | |
Returns the boolean value of the child node with the given tag name. | |
Returns the boolean value of the child node with the given local name and namespace. | |
Sets the child node with the specified tag name to the given text value. | |
Sets the child node with the specified qualified name and namespace to the given text value. | |
Sets the child node with the specified tag name to the given integer value. | |
Sets the child node with the specified qualified name and namespace to the given integer value. | |
Sets the child node with the specified tag name to the given boolean value. | |
Sets the child node with the specified qualified name and namespace to the given boolean value. | |
Returns the first child node that is an element node. | |
Returns the next sibling node that is an element node. | |
Returns the integer value of the attribute node with the given tag name. | |
Returns the integer value of the attribute node with the given local name and namespace. | |
Returns the boolean value of the attribute node with the given tag name. | |
Returns the boolean value of the attribute node with the given local name and namespace. | |
Returns the floating-point value of the attribute node with the given tag name. | |
Returns the floating-point value of the attribute node with the given local name and namespace. | |
Sets the attribute node with the specified tag name to the given integer value. | |
Sets the attribute node with the specified qualified name and namespace to the given integer value. | |
Sets the attribute node with the specified tag name to the given boolean value. | |
Sets the attribute node with the specified qualified name and namespace to the given boolean value. | |
Sets the attribute node with the specified tag name to the given floating-point value. | |
Sets the attribute node with the specified qualified name and namespace to the given floating-point value. |
| |
Returns the node name. | |
Returns the namespace URI of this node. | |
Returns the namespace prefix of the node. | |
Sets the namespace prefix of the node. | |
Returns local part of the qualified name of this node. | |
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. | |
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node. | |
Returns true if this node (if its an element) has any attributes. | |
Returns true if this node has any children. | |
An integer indicating which type of node this is. |
| |
Compare operator. | |
Compare operator. | |
Merges any adjacent Text nodes. | |
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 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. | |
Retrieves the first child node with the specified namespace URI and local name. | |
Searches the node tree upwards for the namespace URI of the given qualified name. | |
Searches the node tree upwards for the prefix name for the namespace URI. | |
Returns all the nodes matching the specified xpath expression using this node as the context node. | |
Returns the first node matching the specified xpath expression using this node as the context node. | |
Returns the first node value matching the specified xpath expression using this node as the context node. | |
Returns the first node value (as integer) matching the specified xpath expression using this node as the context node. | |
Returns the first node value (as float) matching the specified xpath expression using this node as the context node. | |
Returns the first node value (as boolean) matching the specified xpath expression using this node as the context node. |
Detailed description:
By far the vast majority of objects (apart from text) that authors encounter when traversing a document are Element nodes. Assume the following XML document:When represented using DOM, the top node is an Element node for "elementExample", which contains two child Elemodes, one for "subelemeelement1" and one for &quont2&qt;subel1&qel1&qul1&qul1" cochildchild nodesnodes.odes.odes.
Elements may have attributes associated with them; since the Element interface inherits from Node, the generic Node interface method getAttributes may be used to retrieve the set of all attributes for an element. There are methods on the Element interface to retrieve either an Attr object by name or an attribute value by name. In XML, where an attribute value may contain entity references, an Attr object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value.