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

Public Member Functions

void declaration (const orcus::xml_declaration_t &decl)
 
void start_element (const orcus::xml_token_element_t &elem)
 
void end_element (const orcus::xml_token_element_t &elem)
 
void characters (std::string_view val, bool transient)
 

Member Function Documentation

◆ characters()

void orcus::sax_token_handler::characters ( std::string_view  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.

◆ declaration()

void orcus::sax_token_handler::declaration ( const orcus::xml_declaration_t decl)
inline

Called immediately after the entire XML declaration has been parsed.

Parameters
declstruct containing the attributes of the XML declaration.

◆ end_element()

void orcus::sax_token_handler::end_element ( const orcus::xml_token_element_t 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.

◆ start_element()

void orcus::sax_token_handler::start_element ( const orcus::xml_token_element_t 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.