Orcus
Classes | Public Types | Public Member Functions | List of all members
orcus::dom_tree Class Reference

#include <dom_tree.hpp>

Classes

struct  attr
 
struct  content
 
struct  element
 
struct  entity_name
 
struct  node
 

Public Types

enum  node_type { element, content }
 
typedef std::vector< attrattrs_type
 
typedef std::vector< std::unique_ptr< node > > nodes_type
 
typedef std::vector< element * > element_stack_type
 

Public Member Functions

 dom_tree (xmlns_context &cxt)
 
void load (const std::string &strm)
 
void swap (dom_tree &other)
 
void start_declaration (const pstring &name)
 
void end_declaration (const pstring &name)
 
void start_element (xmlns_id_t ns, const pstring &name)
 
void end_element (xmlns_id_t ns, const pstring &name)
 
void set_characters (const pstring &val)
 
void set_attribute (xmlns_id_t ns, const pstring &name, const pstring &val)
 
void set_doctype (const sax::doctype_declaration &dtd)
 
const sax::doctype_declarationget_doctype () const
 
const attrs_type * get_declaration_attributes (const pstring &name) const
 
void dump_compact (std::ostream &os) const
 

Detailed Description

Ordinary DOM tree representing the structure of a XML content in full.

Member Function Documentation

void orcus::dom_tree::load ( const std::string &  strm)

Parse a given XML stream and build the content tree.

Parameters
strmXML stream.
void orcus::dom_tree::swap ( dom_tree other)

Swap the content with another dom_tree instance.

Parameters
otherthe dom_tree instance to swap the content with.