33 #include "dom_string.h"
43 class DomCDATASection;
44 class DomEntityReference;
46 class DomProcessingInstruction;
49 class DomDocumentType;
50 class DomDocumentFragment;
53 class DomNamedNodeMap;
422 std::shared_ptr<DomNode_Impl>
impl;
DomNotation to_notation() const
Returns the Notation interface to this node.
@ TEXT_NODE
Definition: dom_node.h:96
@ ENTITY_NODE
Definition: dom_node.h:99
DomString get_local_name() const
Returns local part of the qualified name of this node.
DomEntityReference to_entity_reference() const
Returns the Entity Reference interface to this node.
bool is_attr() const
Returns true if this is an attribute node.
DomString get_prefix() const
Returns the namespace prefix of the node.
DOM Processing Instruction class.
Definition: dom_processing_instruction.h:44
DomDocument get_owner_document() const
The Document object associated with this node.
DomNode named_item_ns(const DomString &namespace_uri, const DomString &local_name) const
Retrieves the first child node with the specified namespace URI and local name.
@ DOCUMENT_NODE
Definition: dom_node.h:102
bool is_cdata_section() const
Returns true if this is a CDATA section node.
bool select_bool(const DomString &xpath_expression) const
Returns the first node value (as boolean) matching the specified xpath expression using this node as ...
@ ATTRIBUTE_NODE
Definition: dom_node.h:95
int select_int(const DomString &xpath_expression) const
Returns the first node value (as integer) matching the specified xpath expression using this node as ...
@ DOCUMENT_FRAGMENT_NODE
Definition: dom_node.h:104
DOM Entity Reference class.
Definition: dom_entity_reference.h:52
DOM Document Fragment class.
Definition: dom_document_fragment.h:71
DomString find_namespace_uri(const DomString &qualified_name) const
Searches the node tree upwards for the namespace URI of the given qualified name.
float select_float(const DomString &xpath_expression) const
Returns the first node value (as float) matching the specified xpath expression using this node as th...
bool is_element() const
Returns true if this is an element node.
DomNode select_node(const DomString &xpath_expression) const
Returns the first node matching the specified xpath expression using this node as the context node.
bool is_entity_reference() const
Returns true if this is an entity reference node.
DomString get_node_value() const
Returns the node value.
DOM Named Node Map class.
Definition: dom_named_node_map.h:52
DomComment to_comment() const
Returns the Comment interface to this node.
@ ELEMENT_NODE
Definition: dom_node.h:94
bool is_document_type() const
Returns true if this is a document type node.
std::shared_ptr< DomNode_Impl > impl
Definition: dom_node.h:422
DOM Document class.
Definition: dom_document.h:65
DomText to_text() const
Returns the Text interface to this node.
bool is_notation() const
Returns true if this is a notation node.
DomNode named_item(const DomString &name) const
Returns the first child node with the specified node name.
DomProcessingInstruction to_processing_instruction() const
Returns the Processing Instruction interface to this node.
DomAttr to_attr() const
Returns the Attribute interface to this node.
@ ENTITY_REFERENCE_NODE
Definition: dom_node.h:98
@ DOCUMENT_TYPE_NODE
Definition: dom_node.h:103
DomNode get_last_child() const
The last child of this node.
DomNode get_next_sibling() const
The node immediately following this node.
std::vector< DomNode > select_nodes(const DomString &xpath_expression) const
Returns all the nodes matching the specified xpath expression using this node as the context node.
bool is_comment() const
Returns true if this is a comment node.
DomNode replace_child(DomNode &new_child, DomNode &old_child)
Replaces the child node old_child with new_child in the list of children.
DomNode remove_child(DomNode &old_child)
Removes the child node indicated by old_child from the list of children, and returns it.
DomNode(const DomNode ©)
Constructs a DomNode.
NodeType
An integer indicating which type of node this is.
Definition: dom_node.h:92
bool is_supported(const DomString &feature, const DomString &version) const
Tests whether the DOM implementation implements a specific feature and that feature is supported by t...
unsigned short get_node_type() const
Returns the node type (one of those in the NodeType enum).
std::string select_string(const DomString &xpath_expression) const
Returns the first node value matching the specified xpath expression using this node as the context n...
DomNamedNodeMap get_attributes() const
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
bool has_child_nodes() const
Returns true if this node has any children.
DomString get_node_name() const
Returns the node name.
DomElement to_element() const
Returns the Element interface to this node.
DomDocumentType to_document_type() const
Returns the Document Type interface to this node.
DOM Document Type class.
Definition: dom_document_type.h:51
DOM Node class.
Definition: dom_node.h:71
DomNode insert_before(DomNode &new_child, DomNode &ref_child)
Inserts the node new_child before the existing child node ref_child.
DOM Notation class.
Definition: dom_notation.h:49
DOM Text class.
Definition: dom_text.h:55
DOM CDATA Section.
Definition: dom_cdata_section.h:55
DomCDATASection to_cdata_section() const
Returns the CDATA Section interface to this node.
DOM Node List class.
Definition: dom_node_list.h:51
bool operator==(const DomNode &other) const
Compare operator.
DomNode get_parent_node() const
Returns the parent of this node.
DOM Entity class.
Definition: dom_entity.h:46
DomNode get_previous_sibling() const
The node immediately preceding this node.
DomNode get_first_child() const
The first child of this node.
DomNode clone_node(bool deep) const
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
@ COMMENT_NODE
Definition: dom_node.h:101
DomDocument to_document() const
Returns the Document interface to this node.
@ NULL_NODE
Definition: dom_node.h:93
std::string DomString
Definition: dom_string.h:37
void set_node_value(const DomString &value)
Sets the node value.
@ PROCESSING_INSTRUCTION_NODE
Definition: dom_node.h:100
bool operator!=(const DomNode &other) const
Compare operator.
bool is_processing_instruction() const
Returns true if this is a processing instruction node.
DomNode(const std::shared_ptr< DomNode_Impl > &impl)
Constructs a DomNode.
DomNode append_child(DomNode new_child)
Adds the node new_child to the end of the list of children of this node.
DomString get_namespace_uri() const
Returns the namespace URI of this node.
DomNode(DomDocument doc, unsigned short node_type)
Constructs a DomNode.
bool is_null() const
Returns true if this is a null node.
bool is_text() const
Returns true if this is a text node.
DOM Attribute class.
Definition: dom_attr.h:67
void set_prefix(const DomString &prefix)
Sets the namespace prefix of the node.
bool is_entity() const
Returns true if this is an entity node.
bool has_attributes() const
Returns true if this node (if its an element) has any attributes.
DomDocumentFragment to_document_fragment() const
Returns the Document Fragment interface to this node.
DOM Element class.
Definition: dom_element.h:60
void normalize()
Merges any adjacent Text nodes.
DomString find_prefix(const DomString &namespace_uri) const
Searches the node tree upwards for the prefix name for the namespace URI.
DomEntity to_entity() const
Returns the Entity interface to this node.
DomNodeList get_child_nodes() const
Returns a NodeList that contains all children of this node.
@ NOTATION_NODE
Definition: dom_node.h:105
DomNode & operator=(const DomNode ©)
Copy assignment operator.
bool is_document() const
Returns true if this is a document node.
bool is_document_fragment() const
Returns true if this is a document fragment node.
@ CDATA_SECTION_NODE
Definition: dom_node.h:97