#include <Node.h>
Inheritance diagram for org::w3c::dom::Node:
Node
interface is the primary datatype for the entire Document acdk::lang::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 DOMException
being raised.
The attributes nodeName
, nodeValue
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 nodeType
(e.g., nodeValue
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.
The values of nodeName
, nodeValue
, and attributes
vary according to the node type as follows:
Interface | nodeName | nodeValue | attributes |
---|---|---|---|
Attr | same as Attr.name | same as Attr.value | null |
CDATASection | #cdata-section | same as CharacterData.data , the content of the CDATA Section | null |
Comment | #comment | same as CharacterData.data , the content of the comment | null |
Document | #document | null | null |
DocumentFragment | #document-fragment | null | null |
DocumentType | same as DocumentType.name | null | null |
Element | same as Element.tagName | null | NamedNodeMap |
Entity | entity name | null | null |
EntityReference | name of entity referenced | null | null |
Notation | notation name | null | null |
ProcessingInstruction | same as ProcessingInstruction.target | same as ProcessingInstruction.data | null |
Text | #text | same as CharacterData.data , the content of the text node | null |
See also the Document acdk::lang::Object Model (DOM) Level 3 Core Specification.
Public Member Functions | |
virtual acdk::lang::RString | getNodeName ()=0 |
The name of this node, depending on its type; see the table above. | |
virtual acdk::lang::RString | getNamespaceURI ()=0 |
The namespace URI of this node, or null if it is unspecified (see ). | |
virtual acdk::lang::RString | getLocalName ()=0 |
Returns the local part of the qualified name of this node. | |
virtual acdk::lang::RString | getBaseURI ()=0 |
The absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI. | |
virtual acdk::lang::RString | getPrefix ()=0 |
The namespace prefix of this node, or null if it is unspecified. | |
virtual void | setPrefix (IN(acdk::lang::RString) prefix)=0 throw ( RDOMException ) |
The namespace prefix of this node, or null if it is unspecified. | |
virtual acdk::lang::RString | getNodeValue ()=0 throw ( RDOMException ) |
The value of this node, depending on its type; see the table above. | |
virtual void | setNodeValue (IN(acdk::lang::RString) s)=0 throw ( RDOMException ) |
The value of this node, depending on its type; see the table above. | |
virtual short | getNodeType ()=0 |
A code representing the type of the underlying object, as defined above. | |
virtual RNode | getParentNode ()=0 |
The parent of this node. | |
virtual RNodeList | getChildNodes ()=0 |
A NodeList that contains all children of this node. | |
virtual RNode | getFirstChild ()=0 |
The first child of this node. | |
virtual RNode | getLastChild ()=0 |
The last child of this node. | |
virtual RNode | getPreviousSibling ()=0 |
The node immediately preceding this node. | |
virtual RNode | getNextSibling ()=0 |
The node immediately following this node. | |
virtual RNamedNodeMap | getAttributes ()=0 |
A NamedNodeMap containing the attributes of this node (if it is an Element ) or null otherwise. | |
virtual RDocument | getOwnerDocument ()=0 |
The Document object associated with this node. | |
virtual RNode | insertBefore (IN(RNode) node, IN(RNode) node1)=0 throw ( RDOMException ) |
Inserts the node newChild before the existing child node refChild . | |
virtual RNode | replaceChild (IN(RNode) node, IN(RNode) node1)=0 throw ( RDOMException ) |
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. | |
virtual RNode | removeChild (IN(RNode) node)=0 throw ( RDOMException ) |
Removes the child node indicated by oldChild from the list of children, and returns it. | |
virtual RNode | appendChild (IN(RNode) node)=0 throw ( RDOMException ) |
Adds the node newChild to the end of the list of children of this node. | |
virtual bool | hasChildNodes ()=0 |
Returns whether this node has any children. | |
virtual RNode | cloneNode (bool deepCopy)=0 |
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. | |
virtual acdk::lang::RString | getTextContent () throw ( org::w3c::dom::RDOMException ) |
This attribute returns the text content of this node and its descendants. | |
virtual void | setTextContent (IN(acdk::lang::RString) textContent) throw ( org::w3c::dom::RDOMException ) |
This attribute returns the text content of this node and its descendants. | |
virtual RNode | selectNode (IN(acdk::lang::RString) xpath)=0 |
virtual RNodeList | selectNodes (IN(acdk::lang::RString) xpath)=0 |
virtual acdk::lang::RObject | selectObject (IN(acdk::lang::RString) xpath) |
may return Node, NodeList, String Boolean or Number | |
virtual acdk::lang::RString | selectText (IN(acdk::lang::RString) xpath) |
select a string. | |
virtual acdk::lang::RNumber | selectNumber (IN(acdk::lang::RString) xpath) |
virtual acdk::lang::RBoolean | selectBoolean (IN(acdk::lang::RString) xpath) |
virtual acdk::lang::RString | toXML () |
dom4j like extension | |
virtual void | write (IN(acdk::io::RWriter) out, int writeFlags=NWFWDefaultFlags, int indentLevel=0, IN(acdk::lang::RString) encoding=Nil) |
write this node | |
virtual int | getChildCount () |
dom4j like extension return the number of child nodes | |
virtual RNode | getChild (int idx) |
virtual bool | isEqualNode (IN(RNode) other)=0 |
Tests whether two nodes are equal. | |
virtual RNode | detach () |
remove this node from this document |
|
Adds the node
If the
Implemented in acdk::xml::dom::XMLNode. |
|
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
The duplicate node has no parent (
Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
remove this node from this document
|
|
A
Implemented in acdk::xml::dom::XMLElement, acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The absolute base URI of this node or
This value is computed as described in . However, when the
Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
|
|
dom4j like extension return the number of child nodes
Reimplemented in acdk::xml::libxmldom::LibXMLNode. |
|
A
If there are no children, this is a Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The first child of this node.
If there is no such node, this returns Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The last child of this node.
If there is no such node, this returns Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
Returns the local part of the qualified name of this node.
Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The namespace URI of this node, or
Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The node immediately following this node.
If there is no such node, this returns Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The name of this node, depending on its type; see the table above.
Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
A code representing the type of the underlying object, as defined above.
Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The value of this node, depending on its type; see the table above.
When it is defined to be
Implemented in acdk::xml::dom::XMLCharacterData, acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The
This is also the
Implemented in acdk::xml::dom::XMLDocument, acdk::xml::dom::XMLElement, acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The parent of this node.
All nodes, except Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The namespace prefix of this node, or
When it is defined to be
Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
The node immediately preceding this node.
If there is no such node, this returns Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
This attribute returns the text content of this node and its descendants.
When it is defined to be
Reimplemented in acdk::xml::libxmldom::LibXMLNode. |
|
Returns whether this node has any children.
Implemented in acdk::xml::dom::XMLNode, and acdk::xml::libxmldom::LibXMLNode. |
|
Inserts the node
If
Implemented in acdk::xml::dom::XMLNode. |
|
Tests whether two nodes are equal.
For two DocumentType nodes to be equal, the following conditions must also be satisfied:
On the other hand, the following do not affect equality: the ownerDocument , baseURI , and parentNode attributes, the specified attribute for Attr nodes, the schemaTypeInfo attribute for Attr and Element nodes, the Text.isElementContentWhitespace attribute for Text nodes, as well as any user data or event listeners registered on the nodes. <p >Note: As a general rule, anything not mentioned in the description above is not significant in consideration of equality checking. Note that future versions of this specification may take into account more attributes and implementations conform to this specification are expected to be updated accordingly.
|
|
Removes the child node indicated by
Implemented in acdk::xml::dom::XMLNode. |
|
Replaces the child node
Implemented in acdk::xml::dom::XMLNode. |
|
Reimplemented in acdk::xml::libxmldom::LibXMLNode. |
|
|
|
|
|
|
|
may return Node, NodeList, String Boolean or Number
Reimplemented in acdk::xml::libxmldom::LibXMLNode. |
|
select a string. XPath has to select a text node, comment or attribute Reimplemented in acdk::xml::libxmldom::LibXMLNode. |
|
The value of this node, depending on its type; see the table above.
When it is defined to be
|
|
The namespace prefix of this node, or
When it is defined to be
Implemented in acdk::xml::dom::XMLNode. |
|
This attribute returns the text content of this node and its descendants.
When it is defined to be
|
|
|
write this node
|