Orcus
Public Member Functions | List of all members
sax_token_handler Class Reference

#include <sax_token.hpp>

Public Member Functions

void start_element (const orcus::sax_token_parser_element &elem)
 
void end_element (const orcus::sax_token_parser_element &elem)
 
void characters (const orcus::pstring &val, bool transient)
 

Detailed Description

Skeleton handler for sax_token_parser. Feel free to copy this as a starting point for your own handler.

Member Function Documentation

void sax_token_handler::characters ( const orcus::pstring val,
bool  transient 
)
inline

Called when a segment of a text content is parsed. Each text content is a direct child of an element, which may have multiple child contents when the element also has a child element that are direct sibling to the text contents or the text contents are splitted by a comment.

Parameters
valvalue of the text content.
transientwhen true, the text content has been converted and is stored in a temporary buffer due to presence of one or more encoded characters, in which case the passed text value needs to be either immediately converted to a non-text value or be interned within the scope of the callback.
void sax_token_handler::end_element ( const orcus::sax_token_parser_element elem)
inline

Called at the end of each element.

Parameters
elemstruct containing the element's information as well as all the attributes that belong to the element.
void sax_token_handler::start_element ( const orcus::sax_token_parser_element elem)
inline

Called at the start of each element.

Parameters
elemstruct containing the element's information as well as all the attributes that belong to the element.