libexpatpp 0.1.8
Public Member Functions | List of all members
xmlpp::delegate Class Referenceabstract

definition of the parser delegate interface. More...

#include <delegate.hpp>

Inheritance diagram for xmlpp::delegate:
Inheritance graph
[legend]

Public Member Functions

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 onEndElement (const XML_Char *fullname)=0
 callback is called after parsing the end tag of an xml element
 
virtual void onCharacterData (const char *pBuf, int len)=0
 callback is called with parsed character data inside of an xml element.
 
virtual void onComment (const XML_Char *data)=0
 callback called on parsed xml comment
 
virtual void onStartCdataSection ()=0
 callback will be called if the begin of a PCDATA section was parsed
 
virtual void onEndCdataSection ()=0
 callback will be called after the end of a PCDATA section 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 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 onProcessingInstruction (const XML_Char *target, const XML_Char *data)=0
 delegate function is called if an xml processing instruction was found
 
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 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.
 
virtual void onEndDoctypeDecl ()=0
 delegate function is called if end of DTD is parsed from xml data
 
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 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 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 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 onUnparsedEntityDecl (const XML_Char *entityName, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)=0
 
virtual void onSkippedEntity (const XML_Char *entityName, int is_parameter_entity)=0
 

Detailed Description

definition of the parser delegate interface.

the parser delegate handles the different parser events

Member Function Documentation

◆ onAttlistDecl()

virtual void xmlpp::delegate::onAttlistDecl ( const XML_Char *  elname,
const XML_Char *  attname,
const XML_Char *  att_type,
const XML_Char *  dflt,
bool  isrequired 
)
pure virtual

delegate function is called if an element attribute list declaration is parsed.

Parameters
elnamename of the declared element this attribute list refers to
attnamename of the declared attribute
att_typetype of the declared attribute
dflt
isrequiredtrue if attribute is required, false if optional

Implemented in xmlpp::abstract_delegate.

◆ onCharacterData()

virtual void xmlpp::delegate::onCharacterData ( const char *  pBuf,
int  len 
)
pure virtual

callback is called with parsed character data inside of an xml element.

it may called more than once if the text inside of an xml element does not fit into the parse buffer.

Parameters
pBufpointer to the text data
lenlen of the returned string

Implemented in xmlpp::abstract_delegate, and xmlpp::StatefulDelegate.

◆ onComment()

virtual void xmlpp::delegate::onComment ( const XML_Char *  data)
pure virtual

callback called on parsed xml comment

Parameters
datacontains the content of the comment
Todo:
check if called more than once for one comment

Implemented in xmlpp::abstract_delegate.

◆ onElementDecl()

virtual void xmlpp::delegate::onElementDecl ( const XML_Char *  name,
XML_Content *  model 
)
pure virtual

delegate function is called if an DTD element declaration is parsed from xml data.

for details of the model see expat library documentation

Parameters
namename of the declared element
modelthe content model for the declared element

Implemented in xmlpp::abstract_delegate.

◆ onEndCdataSection()

virtual void xmlpp::delegate::onEndCdataSection ( )
pure virtual

callback will be called after the end of a PCDATA section was parsed

Implemented in xmlpp::abstract_delegate.

◆ onEndDoctypeDecl()

virtual void xmlpp::delegate::onEndDoctypeDecl ( )
pure virtual

delegate function is called if end of DTD is parsed from xml data

Implemented in xmlpp::abstract_delegate.

◆ onEndElement()

virtual void xmlpp::delegate::onEndElement ( const XML_Char *  fullname)
pure virtual

callback is called after parsing the end tag of an xml element

Parameters
fullnamename of the ended sml element

Implemented in xmlpp::abstract_delegate, and xmlpp::StatefulDelegate.

◆ onEndNamespace()

virtual void xmlpp::delegate::onEndNamespace ( const XML_Char *  prefix)
pure virtual

delegate function is called when an xml namespace is ended

Parameters
prefixprefix of the xml namespace

Implemented in xmlpp::abstract_delegate.

◆ onEntityDecl()

virtual void xmlpp::delegate::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 
)
pure virtual

delegate function is called if an entity declaration was parsed

Parameters
entityNamename of the declared entity
is_parameter_entity
value
value_length
base
systemId
publicId
notationName

Implemented in xmlpp::abstract_delegate.

◆ onNotationDecl()

virtual void xmlpp::delegate::onNotationDecl ( const XML_Char *  notationName,
const XML_Char *  base,
const XML_Char *  systemId,
const XML_Char *  publicId 
)
pure virtual

delegate function is called if an notation declaration was parsed

Parameters
notationNamename of the declared notation
base
systemId
publicId

Implemented in xmlpp::abstract_delegate.

◆ onParseError()

virtual void xmlpp::delegate::onParseError ( size_t  line,
size_t  column,
size_t  pos,
Error  error 
)
pure virtual

function is called if on parsing a parse error is detected

Parameters
lineline in xml file or string where the error is detected
columncolumn in xml file or string where the error is detected
posposition of detected parse error in bytes from begin of parsing
errorerror code for type of parse error (wrapper for XML_Error from expat

Implemented in xmlpp::abstract_delegate.

◆ onProcessingInstruction()

virtual void xmlpp::delegate::onProcessingInstruction ( const XML_Char *  target,
const XML_Char *  data 
)
pure virtual

delegate function is called if an xml processing instruction was found

Parameters
targetTODO
dataTODO

Implemented in xmlpp::abstract_delegate.

◆ onStartCdataSection()

virtual void xmlpp::delegate::onStartCdataSection ( )
pure virtual

callback will be called if the begin of a PCDATA section was parsed

Implemented in xmlpp::abstract_delegate.

◆ onStartDoctypeDecl()

virtual void xmlpp::delegate::onStartDoctypeDecl ( const XML_Char *  doctypeName,
const XML_Char *  sysid,
const XML_Char *  pubid,
int  has_internal_subset 
)
pure virtual

delegate function is called when a DTD (document type definition) xml entry is parsed.

Parameters
doctypeNamename of the document type definition
sysidsystem Id
pubidpublic id
has_internal_subsetdtd has an internal subset

Implemented in xmlpp::abstract_delegate.

◆ onStartElement()

virtual void xmlpp::delegate::onStartElement ( const XML_Char *  fullname,
const XML_Char **  atts 
)
pure virtual

this callback is called after parsing the starting tag of an xml element.

Parameters
fullnamename of the started xml element
attslist of elements attributes as list of key and value strings

Implemented in xmlpp::abstract_delegate, and xmlpp::StatefulDelegate.

◆ onStartNamespace()

virtual void xmlpp::delegate::onStartNamespace ( const XML_Char *  prefix,
const XML_Char *  uri 
)
pure virtual

delegate function is called when an xml namespace is started/ opened

Parameters
prefixprefix of the xml namespace
uriuri of namespace

Implemented in xmlpp::abstract_delegate.

◆ onXmlDecl()

virtual void xmlpp::delegate::onXmlDecl ( const XML_Char *  version,
const XML_Char *  encoding,
int  standalone 
)
pure virtual

delegate function is called after the (starting) xml declaration is parsed.

Parameters
versionthe xml version
encodingthe encoding of the following xml content
standalone1 for standalone xml file

Implemented in xmlpp::abstract_delegate.


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