feisty meow concerns codebase
2.140
|
Parses XML input and invokes a callback for the different syntactic pieces. More...
#include <xml_parser.h>
Public Types | |
enum | outcomes { OKAY = basis::common::OKAY } |
the possible ways that operations here can complete. More... | |
Public Member Functions | |
xml_parser (const basis::astring &to_parse) | |
virtual | ~xml_parser () |
DEFINE_CLASS_NAME ("xml_parser") | |
void | reset (const basis::astring &to_parse) |
throws out any accumulated information and uses "to_parse" instead. More... | |
basis::outcome | parse () |
starts the parsing process on the current string. More... | |
virtual basis::outcome | header_callback (basis::astring &header_name, structures::string_table &attributes) |
invoked when a well-formed xml header is seen in the input stream. More... | |
virtual basis::outcome | tag_open_callback (basis::astring &tag_name, structures::string_table &attributes) |
an xml tag has been opened in the input stream. More... | |
virtual basis::outcome | tag_close_callback (basis::astring &tag_name) |
an xml tag was closed in the input stream. More... | |
virtual basis::outcome | content_callback (basis::astring &content) |
invoked when plain text content is found inside an opened tag. More... | |
Static Public Member Functions | |
static const char * | outcome_name (const basis::outcome &to_name) |
reports the string version of "to_name". More... | |
Parses XML input and invokes a callback for the different syntactic pieces.
Definition at line 28 of file xml_parser.h.
the possible ways that operations here can complete.
Enumerator | |
---|---|
OKAY |
Definition at line 37 of file xml_parser.h.
textual::xml_parser::xml_parser | ( | const basis::astring & | to_parse | ) |
Definition at line 25 of file xml_parser.cpp.
|
virtual |
Definition at line 31 of file xml_parser.cpp.
|
virtual |
invoked when plain text content is found inside an opened tag.
Definition at line 66 of file xml_parser.cpp.
textual::xml_parser::DEFINE_CLASS_NAME | ( | "xml_parser" | ) |
|
virtual |
invoked when a well-formed xml header is seen in the input stream.
the following applies to all of the callbacks: the derived method must return an outcome, which will be used by the parser. if the outcome is OKAY, then parsing will continue. any other outcome will cause parsing to stop and will become the return value of the parse() method.
Definition at line 45 of file xml_parser.cpp.
References structures::symbol_table< contents >::symbols().
|
static |
reports the string version of "to_name".
Definition at line 35 of file xml_parser.cpp.
References basis::common::outcome_name().
outcome textual::xml_parser::parse | ( | ) |
starts the parsing process on the current string.
this will cause callbacks to be invoked for each of the xml syntactic elements.
Definition at line 72 of file xml_parser.cpp.
void textual::xml_parser::reset | ( | const basis::astring & | to_parse | ) |
throws out any accumulated information and uses "to_parse" instead.
Definition at line 40 of file xml_parser.cpp.
|
virtual |
an xml tag was closed in the input stream.
Definition at line 60 of file xml_parser.cpp.
|
virtual |
an xml tag has been opened in the input stream.
Definition at line 53 of file xml_parser.cpp.
References structures::symbol_table< contents >::symbols().