#include <Node.h>
Public Types | |
| enum | Type { CDATA = 1, COMMENT, DECLARATION, DOC_TYPE_DECL, DOCUMENT, ELEMENT, PROCESSING_INSTRUCTION, STYLESHEET_REFERENCE, TEXT } |
| typedef std::vector< Node * > | ChildNodes |
Public Member Functions | |
| Type | get_type () const |
| Document * | get_document () const |
| Node * | get_parent_node () const |
| const ChildNodes * | get_child_nodes () const |
| int | get_depth () const |
| size_t | find_child_nodes (Type type, ChildNodes *child_nodes) const |
| virtual cl7::string_type | generate () const |
| bool | has_child_node (const Node *child_node) const |
| cl7::string_type | indent () const |
Public Attributes | |
| friend | Document |
| friend | Element |
Protected Member Functions | |
| Node (Type type) | |
| virtual | ~Node (void) |
The base class representing any xml node.
| typedef std::vector<Node*> xl7::xml::Node::ChildNodes |
| enum xl7::xml::Node::Type |
| xl7::xml::Node::Node | ( | Type | type | ) | [protected] |
Explicit constructor.
| xl7::xml::Node::~Node | ( | void | ) | [protected, virtual] |
Destructor.
| size_t xl7::xml::Node::find_child_nodes | ( | Type | type, | |
| ChildNodes * | child_nodes | |||
| ) | const |
Finds all child nodes of the given type and puts them into the given container. The number of child nodes found will be returned.
| cl7::string_type xl7::xml::Node::generate | ( | ) | const [virtual] |
Generates xml text representing this xml object.
Implements xl7::xml::Base.
Reimplemented in xl7::xml::CData, xl7::xml::Comment, xl7::xml::Declaration, xl7::xml::DocTypeDecl, xl7::xml::Element, xl7::xml::ProcessingInstruction, xl7::xml::StylesheetReference, and xl7::xml::Text.
| const ChildNodes* xl7::xml::Node::get_child_nodes | ( | ) | const [inline] |
Returns the child nodes of this element.
| int xl7::xml::Node::get_depth | ( | ) | const [inline] |
Returns the depth of this node.
| Document* xl7::xml::Node::get_document | ( | ) | const [inline] |
Returns the document of this node.
| Node* xl7::xml::Node::get_parent_node | ( | ) | const [inline] |
Returns the parent node of this node.
| Type xl7::xml::Node::get_type | ( | ) | const [inline] |
Returns the type of this node.
Reimplemented in xl7::xml::StylesheetReference.
| bool xl7::xml::Node::has_child_node | ( | const Node * | child_node | ) | const |
Returns true, if this element holds the given child node, false otherwise.
| cl7::string_type xl7::xml::Node::indent | ( | ) | const |
| friend xl7::xml::Node::Document |
| friend xl7::xml::Node::Element |
Reimplemented in xl7::xml::CData, xl7::xml::Comment, xl7::xml::ProcessingInstruction, and xl7::xml::Text.
1.7.1