Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

xmlight::TParser Class Reference

XML parser class. More...

#include <parser.hh>

List of all members.

Public Methods

 TParser ()
 Default constructor.

virtual ~TParser ()
 Default destructor.

void parse_string (const std::string &)
 Parses string.

int state ()
 Returns error state.

void parse_end ()
 Notices parser about end of document.


Protected Methods

virtual void on_start_document ()
 Called at begin of document/parsing.

virtual void on_start_element (const std::string &, const TAttributes &)
 Called for start elements.

virtual void on_end_element (const std::string &)
 Called for end elements.

virtual void on_data (const std::string &)
 Called for data between elements.

virtual void on_comment (const std::string &)
 Called for comments.

virtual void on_warning (const std::string &)
 Called for warnings.

virtual void on_error (const std::string &)
 Called for errors.

virtual void on_fatal_error (const::std::string &)
 Called for fatal errors.

virtual void on_end_document ()
 Called at end of document/parsing.


Detailed Description

XML parser class.

The main parser class. You must inherit this one and override the needed on_* function(s).

Definition at line 37 of file parser.hh.


Member Function Documentation

virtual void xmlight::TParser::on_start_element const std::string &   ,
const TAttributes &   
[inline, protected, virtual]
 

Called for start elements.

This function is called every time the parser finds an element. If this element is an empty element, there will be a call to on_end_element() after on_start_element().

Definition at line 67 of file parser.hh.

References mpcl::text::xml::TAttributes.

void xmlight::TParser::parse_string const std::string &   
 

Parses string.

Parses string containing XML data (doesn't have to hold the whole document.)

int xmlight::TParser::state   [inline]
 

Returns error state.

Returns 1 if no error has occured, else 0. Will be replaced!

Definition at line 55 of file parser.hh.


The documentation for this class was generated from the following file:
Generated on Mon Oct 13 02:35:28 2003 for MPCL by doxygen1.2.18