#include <parser.hh>
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. |
The main parser class. You must inherit this one and override the needed on_* function(s).
Definition at line 37 of file parser.hh.
|
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. |
|
Parses string. Parses string containing XML data (doesn't have to hold the whole document.) |
|
Returns error state. Returns 1 if no error has occured, else 0. Will be replaced! |