Parses XML input and invokes a callback for the different syntactic pieces.
virtual basis::outcome content_callback(basis::astring &content)
invoked when plain text content is found inside an opened tag.
DEFINE_CLASS_NAME("xml_parser")
virtual basis::outcome tag_open_callback(basis::astring &tag_name, structures::string_table &attributes)
an xml tag has been opened in the input stream.
void reset(const basis::astring &to_parse)
throws out any accumulated information and uses "to_parse" instead.
outcomes
the possible ways that operations here can complete.
static const char * outcome_name(const basis::outcome &to_name)
reports the string version of "to_name".
virtual basis::outcome tag_close_callback(basis::astring &tag_name)
an xml tag was closed in the input stream.
basis::outcome parse()
starts the parsing process on the current string.
xml_parser(const basis::astring &to_parse)
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.