9#ifndef xmlpp_delegate_hpp
10#define xmlpp_delegate_hpp
21 explicit Error (XML_Error error)
noexcept;
22 std::string to_string()
const;
23 XML_Error errorcode()
const;
42 const XML_Char **atts) = 0;
virtual void onXmlDecl(
const XML_Char *version,
88 const XML_Char *encoding,
110 const XML_Char* data) = 0;
119 const XML_Char* uri) = 0;
139 const XML_Char *sysid,
140 const XML_Char *pubid,
141 int has_internal_subset) = 0;
168 const XML_Char *attname,
169 const XML_Char *att_type,
170 const XML_Char *dflt,
171 bool isrequired) = 0;
virtual void onEntityDecl(
const XML_Char *entityName,
185 int is_parameter_entity,
186 const XML_Char *value,
188 const XML_Char *base,
189 const XML_Char *systemId,
190 const XML_Char *publicId,
191 const XML_Char *notationName) = 0;
virtual void onNotationDecl(
const XML_Char* notationName,
201 const XML_Char* base,
202 const XML_Char* systemId,
203 const XML_Char* publicId) = 0;
205 virtual void onUnparsedEntityDecl(
const XML_Char* entityName,
206 const XML_Char* base,
207 const XML_Char* systemId,
208 const XML_Char* publicId,
209 const XML_Char* notationName) = 0;
210 virtual void onSkippedEntity(
const XML_Char *entityName,
211 int is_parameter_entity) = 0;
221 void onStartElement(
const XML_Char *fullname,
const XML_Char **atts)
override;
225 const XML_Char* data)
override;
226 void onUnparsedEntityDecl(
const XML_Char* entityName,
227 const XML_Char* base,
228 const XML_Char* systemId,
229 const XML_Char* publicId,
230 const XML_Char* notationName)
override;
232 const XML_Char* base,
233 const XML_Char* systemId,
234 const XML_Char* publicId)
override;
235 void onStartNamespace(
const XML_Char* prefix,
const XML_Char* uri)
override;
238 const XML_Char *attname,
239 const XML_Char *att_type,
240 const XML_Char *dflt,
241 bool isrequired)
override;
246 const XML_Char *sysid,
247 const XML_Char *pubid,
248 int has_internal_subset)
override;
251 void onComment(
const XML_Char *data)
override;
252 void onElementDecl(
const XML_Char *name, XML_Content *model)
override;
254 int is_parameter_entity,
255 const XML_Char *value,
257 const XML_Char *base,
258 const XML_Char *systemId,
259 const XML_Char *publicId,
260 const XML_Char *notationName)
override;
261 void onSkippedEntity(
const XML_Char *entityName,
262 int is_parameter_entity)
override;
264 const XML_Char *encoding,
265 int standalone)
override;
wrapper class type for expats XML_Error
Definition delegate.hpp:19
default base class for delegates.
Definition delegate.hpp:217
void onStartNamespace(const XML_Char *prefix, const XML_Char *uri) override
delegate function is called when an xml namespace is started/ opened
Definition delegate.cpp:56
void onEndElement(const XML_Char *fullname) override
callback is called after parsing the end tag of an xml element
Definition delegate.cpp:35
void onEndDoctypeDecl() override
delegate function is called if end of DTD is parsed from xml data
Definition delegate.cpp:76
void onParseError(size_t line, size_t column, size_t pos, Error error) override
function is called if on parsing a parse error is detected
Definition delegate.cpp:103
void onProcessingInstruction(const XML_Char *target, const XML_Char *data) override
delegate function is called if an xml processing instruction was found
Definition delegate.cpp:41
void onNotationDecl(const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) override
delegate function is called if an notation declaration was parsed
Definition delegate.cpp:51
void onElementDecl(const XML_Char *name, XML_Content *model) override
delegate function is called if an DTD element declaration is parsed from xml data.
Definition delegate.cpp:81
void onStartDoctypeDecl(const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset) override
delegate function is called when a DTD (document type definition) xml entry is parsed.
Definition delegate.cpp:71
void onCharacterData(const char *pBuf, int len) override
callback is called with parsed character data inside of an xml element.
Definition delegate.cpp:38
void onAttlistDecl(const XML_Char *elname, const XML_Char *attname, const XML_Char *att_type, const XML_Char *dflt, bool isrequired) override
delegate function is called if an element attribute list declaration is parsed.
Definition delegate.cpp:61
void onXmlDecl(const XML_Char *version, const XML_Char *encoding, int standalone) override
delegate function is called after the (starting) xml declaration is parsed.
Definition delegate.cpp:98
void onEndNamespace(const XML_Char *) override
delegate function is called when an xml namespace is ended
Definition delegate.cpp:60
void onStartCdataSection() override
callback will be called if the begin of a PCDATA section was parsed
Definition delegate.cpp:66
void onStartElement(const XML_Char *fullname, const XML_Char **atts) override
this callback is called after parsing the starting tag of an xml element.
Definition delegate.cpp:32
void onEntityDecl(const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName) override
delegate function is called if an entity declaration was parsed
Definition delegate.cpp:84
void onComment(const XML_Char *data) override
callback called on parsed xml comment
Definition delegate.cpp:79
void onEndCdataSection() override
callback will be called after the end of a PCDATA section was parsed
Definition delegate.cpp:68
definition of the parser delegate interface.
Definition delegate.hpp:31
virtual void onElementDecl(const XML_Char *name, XML_Content *model)=0
delegate function is called if an DTD element declaration is parsed from xml data.
virtual void onStartElement(const XML_Char *fullname, const XML_Char **atts)=0
this callback is called after parsing the starting tag of an xml element.
virtual void onProcessingInstruction(const XML_Char *target, const XML_Char *data)=0
delegate function is called if an xml processing instruction was found
virtual void onParseError(size_t line, size_t column, size_t pos, Error error)=0
function is called if on parsing a parse error is detected
virtual void onEntityDecl(const XML_Char *entityName, int is_parameter_entity, const XML_Char *value, int value_length, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)=0
delegate function is called if an entity declaration was parsed
virtual void onEndCdataSection()=0
callback will be called after the end of a PCDATA section was parsed
virtual void onAttlistDecl(const XML_Char *elname, const XML_Char *attname, const XML_Char *att_type, const XML_Char *dflt, bool isrequired)=0
delegate function is called if an element attribute list declaration is parsed.
virtual void onComment(const XML_Char *data)=0
callback called on parsed xml comment
virtual void onCharacterData(const char *pBuf, int len)=0
callback is called with parsed character data inside of an xml element.
virtual void onNotationDecl(const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId)=0
delegate function is called if an notation declaration was parsed
virtual void onXmlDecl(const XML_Char *version, const XML_Char *encoding, int standalone)=0
delegate function is called after the (starting) xml declaration is parsed.
virtual void onStartNamespace(const XML_Char *prefix, const XML_Char *uri)=0
delegate function is called when an xml namespace is started/ opened
virtual void onEndDoctypeDecl()=0
delegate function is called if end of DTD is parsed from xml data
virtual void onEndElement(const XML_Char *fullname)=0
callback is called after parsing the end tag of an xml element
virtual void onStartCdataSection()=0
callback will be called if the begin of a PCDATA section was parsed
virtual void onEndNamespace(const XML_Char *prefix)=0
delegate function is called when an xml namespace is ended
virtual void onStartDoctypeDecl(const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset)=0
delegate function is called when a DTD (document type definition) xml entry is parsed.