Public Types | Public Member Functions | Public Attributes | Protected Member Functions

xl7::xml::Node Class Reference

#include <Node.h>

Inheritance diagram for xl7::xml::Node:
xl7::xml::Base xl7::xml::CData xl7::xml::Comment xl7::xml::Declaration xl7::xml::DocTypeDecl xl7::xml::Document xl7::xml::Element xl7::xml::ProcessingInstruction xl7::xml::StylesheetReference xl7::xml::Text

List of all members.

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
Documentget_document () const
Nodeget_parent_node () const
const ChildNodesget_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)

Detailed Description

The base class representing any xml node.


Member Typedef Documentation

typedef std::vector<Node*> xl7::xml::Node::ChildNodes

Member Enumeration Documentation

Enumerator:
CDATA 
COMMENT 
DECLARATION 
DOC_TYPE_DECL 
DOCUMENT 
ELEMENT 
PROCESSING_INSTRUCTION 
STYLESHEET_REFERENCE 
TEXT 

Constructor & Destructor Documentation

xl7::xml::Node::Node ( Type  type  )  [protected]

Explicit constructor.

xl7::xml::Node::~Node ( void   )  [protected, virtual]

Destructor.


Member Function Documentation

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]
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

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines