DOM Attribute class. More...
Derived from: | public CL_DomNode |
Derived by: | None |
Group: | XML (Core) |
#include <ClanLib/core.h>
Class Members:
Construction: | |
Constructs a DOM Attr handle. |
| |
Returns the name of this attribute. | |
If this attribute was explicitly given a value in the original document, this is true; otherwise, it is false. | |
Returns the value of the attribute. | |
Sets the value of the attribute. | |
Returns the attribute'sr element.ment. |
| |
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:
The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a document type definition.Attr objects inherit the Node interface, but since they are not actually child nodes of the element they describe, the DOM does not consider them part of the document tree. Thus, the Node attributes parentNode, previousSibling, and nextSibling have a null value for Attr objects. The DOM takes the view that attributes are properties of elements rather than having a separate identity from the elements they are associated with; this should make it more efficient to implement such features as default attributes associated with all elements of a given type. Furthermore, Attr nodes may not be immediate children of a DocumentFragment. However, they can be associated with Element nodes contained within a DocumentFragment. In short, users and implementors of the DOM need to be aware that Attr nodes have some things in common with other objects inheriting the Node interface, but they also are quite distinct.
The attribute's effective value termined as follows: if this attribute hate has been explicitly assigned any value, that value is the attribute's effective valuherwise, if there is a declaration for this this attribute, and that declaration includes a default value, then that default value is the attribute's effective value; otherwise, the attribute not exist on thon this element in the structure model until it has been explicitly added. Note that the nodeValue attribute on the Attr instance can also be estring veng verg versf trsf thef thef the attriapos;apos;s value(s).
In XML, where the value of an attribute can contain entity references, the child nodes of the Attr node provide a representation in which entity references are not expanded. These child nodes may be either Text or EntityReference nodes. Because the attribute type may be unknown, there are no tokenized attribute values.