DOM node.
More...
#include <base/xml/Node.h>
Inherits AutomationObject.
Inherited by Attribute, CharacterData, Declaration, Document, DocumentFragment, DocumentType, Element, Entity, EntityReference, Notation, and ProcessingInstruction.
|
enum | NodeType {
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,
ATTRIBUTE_DECL_NODE,
ELEMENT_DECL_NODE,
ENTITY_DECL_NODE
} |
|
DOM node.
DOM node.
- Version
- 1.0
- Examples
- testsuite/dom.cpp, and testsuite/sax.cpp.
◆ NodeType
◆ Node() [1/3]
Node::Node |
( |
void * |
_context | ) |
|
|
inlineprotectednoexcept |
◆ Node() [2/3]
Initializes XML node as invalid.
◆ Node() [3/3]
Node::Node |
( |
const Node & |
copy | ) |
|
|
inlinenoexcept |
Initializes XML node from other XML node.
◆ ~Node()
Destroys the handle. The node is destroyed when detached.
◆ appendChild()
Adds the node to the end of the list of children of this node.
- Returns
- The node being appended.
- Examples
- testsuite/sax.cpp.
◆ cloneNode()
Node Node::cloneNode |
( |
bool |
deep | ) |
|
Returns a duplicate of this node.
◆ getContext() [1/2]
const void* Node::getContext |
( |
| ) |
const |
|
inlineprotectednoexcept |
Returns the context for non-modifiable access.
◆ getContext() [2/2]
void* Node::getContext |
( |
| ) |
|
|
inlineprotectednoexcept |
Returns the context for modifying access.
◆ getFirstChild()
Node Node::getFirstChild |
( |
| ) |
const |
Returns the first child node.
◆ getLastChild()
Node Node::getLastChild |
( |
| ) |
const |
Returns the last child node.
◆ getLocalName()
String Node::getLocalName |
( |
| ) |
const |
|
noexcept |
Returns the local part of the qualified name of this node.
◆ getName()
String Node::getName |
( |
| ) |
const |
Returns the name of the node.
◆ getNamespaceURI()
String Node::getNamespaceURI |
( |
| ) |
const |
|
noexcept |
The namespace URI of this node, or an improper string if it is unspecified.
◆ getNextSibling()
Node Node::getNextSibling |
( |
| ) |
const |
|
noexcept |
◆ getOwnerDocument()
Returns the Document object associated with this node.
◆ getParent()
Node Node::getParent |
( |
| ) |
const |
|
noexcept |
◆ getPrefix()
String Node::getPrefix |
( |
| ) |
const |
The namespace prefix of this node, or an improper string if it is unspecified.
◆ getPreviousSibling()
Node Node::getPreviousSibling |
( |
| ) |
const |
|
noexcept |
Returns the node immediately preceding this node.
◆ getType()
◆ getValue()
String Node::getValue |
( |
| ) |
const |
Returns the value of the node.
◆ hasAttributes()
bool Node::hasAttributes |
( |
| ) |
const |
|
noexcept |
Returns whether this node (if it is an element) has any attributes.
◆ hasChildNodes()
bool Node::hasChildNodes |
( |
| ) |
const |
◆ hasSameOwner()
bool Node::hasSameOwner |
( |
const Node & |
node | ) |
const |
|
noexcept |
Returns true if the specified node has the same owner as this node.
◆ insertBefore()
Inserts the node newChild before the existing child node refChild. If refChild is invalid, insert newChild at the end of the list of children. If newChild is a DocumentFragment object, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed.
- Returns
- The node being inserted.
◆ isAncestor()
bool Node::isAncestor |
( |
const Node & |
node | ) |
const |
|
noexcept |
Returns true if this node is an ancestor of the specified node.
◆ isInvalid()
bool Node::isInvalid |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if the node has been initialized.
◆ isSame()
bool Node::isSame |
( |
const Node & |
node | ) |
const |
|
inlinenoexcept |
Returns true if the nodes refer to the the same node.
◆ isSupported()
bool Node::isSupported |
( |
const String & |
feature, |
|
|
const String & |
version |
|
) |
| const |
|
noexcept |
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
◆ isUnlinked()
bool Node::isUnlinked |
( |
| ) |
const |
|
noexcept |
Returns true if the node is unlinked.
◆ isValid()
bool Node::isValid |
( |
| ) |
const |
|
inlinenoexcept |
◆ normalize()
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g. elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
◆ operator bool()
Node::operator bool |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if the node is valid.
◆ operator=()
Node& Node::operator= |
( |
const Node & |
assign | ) |
|
|
inlinenoexcept |
Assignment of node by node.
◆ operator==()
bool Node::operator== |
( |
const Node & |
node | ) |
const |
|
inlinenoexcept |
Returns true if the nodes refer to the the same node.
◆ removeChild()
Removes the child node indicated by child from the list of children, and returns it.
◆ replaceChild()
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
◆ setPrefix()
void Node::setPrefix |
( |
const String & |
prefix | ) |
|
◆ setValue()
void Node::setValue |
( |
const String & |
value | ) |
|
Sets the value of the node.