Doxygen
Loading...
Searching...
No Matches
XMLHandlers Class Reference

Event handlers that can installed by the client and called while parsing a XML document. More...

#include <libxml/xml.h>

Public Types

using Attributes = std::unordered_map<std::string,std::string>
 
using StartDocType = void()
 
using EndDocType = void()
 
using StartElementType = void(const std::string &,const Attributes &)
 
using EndElementType = void(const std::string &)
 
using ErrorType = void(const std::string,int,const std::string &)
 
using CharsType = void(const std::string &)
 

Static Public Member Functions

static std::string value (const Attributes &attrib, const std::string &key)
 

Public Attributes

std::function< StartDocTypestartDocument
 handler invoked at the start of the document
 
std::function< EndDocTypeendDocument
 handler invoked at the end of the document
 
std::function< StartElementTypestartElement
 handler invoked when an opening tag has been found
 
std::function< EndElementTypeendElement
 handler invoked when a closing tag has been found
 
std::function< CharsTypecharacters
 handler invoked when content between tags has been found
 
std::function< ErrorTypeerror
 handler invoked when the parser encounters an error
 

Detailed Description

Event handlers that can installed by the client and called while parsing a XML document.

Definition at line 26 of file xml.h.

Member Typedef Documentation

◆ Attributes

using XMLHandlers::Attributes = std::unordered_map<std::string,std::string>

Definition at line 29 of file xml.h.

◆ CharsType

using XMLHandlers::CharsType = void(const std::string &)

Definition at line 35 of file xml.h.

◆ EndDocType

using XMLHandlers::EndDocType = void()

Definition at line 31 of file xml.h.

◆ EndElementType

using XMLHandlers::EndElementType = void(const std::string &)

Definition at line 33 of file xml.h.

◆ ErrorType

using XMLHandlers::ErrorType = void(const std::string,int,const std::string &)

Definition at line 34 of file xml.h.

◆ StartDocType

using XMLHandlers::StartDocType = void()

Definition at line 30 of file xml.h.

◆ StartElementType

using XMLHandlers::StartElementType = void(const std::string &,const Attributes &)

Definition at line 32 of file xml.h.

Member Function Documentation

◆ value()

Member Data Documentation

◆ characters

std::function<CharsType> XMLHandlers::characters

handler invoked when content between tags has been found

Definition at line 41 of file xml.h.

Referenced by parseTagFile().

◆ endDocument

std::function<EndDocType> XMLHandlers::endDocument

handler invoked at the end of the document

Definition at line 38 of file xml.h.

◆ endElement

std::function<EndElementType> XMLHandlers::endElement

handler invoked when a closing tag has been found

Definition at line 40 of file xml.h.

Referenced by LayoutDocManager::init(), LayoutDocManager::parse(), and parseTagFile().

◆ error

std::function<ErrorType> XMLHandlers::error

handler invoked when the parser encounters an error

Definition at line 42 of file xml.h.

Referenced by LayoutDocManager::init(), LayoutDocManager::parse(), and parseTagFile().

◆ startDocument

std::function<StartDocType> XMLHandlers::startDocument

handler invoked at the start of the document

Definition at line 37 of file xml.h.

Referenced by parseTagFile().

◆ startElement

std::function<StartElementType> XMLHandlers::startElement

handler invoked when an opening tag has been found

Definition at line 39 of file xml.h.

Referenced by LayoutDocManager::init(), LayoutDocManager::parse(), and parseTagFile().


The documentation for this class was generated from the following file: