MoSync 3.3
Mtx::SaxListenerT< Tchar > Class Template Reference

Base class for SAX parser callback interfaces. More...

#include <MTXml/MTSax.h>

List of all members.

Public Member Functions

virtual void mtxEncoding (const char *value)=0
virtual void mtxStartElement (const Tchar *name, const Tchar **attributes)=0
virtual void mtxEndElement (const Tchar *name)=0
virtual void mtxCharacters (const Tchar *data, int length)=0
virtual void mtxParseError (int offset)=0

Detailed Description

template<class Tchar>
class Mtx::SaxListenerT< Tchar >

Base class for SAX parser callback interfaces.

Inherit from this to receive callbacks from a SaxContext. This is analogous to filling in the function pointers of a MTXSaxContext object.


Member Function Documentation

template<class Tchar>
virtual void Mtx::SaxListenerT< Tchar >::mtxEncoding ( const char *  value) [pure virtual]

If the "encoding" attribute is present in the "?xml" tag, this function is called.

The default encoding is UTF-8.

Parameters:
contextThe current context.
valueThe encoding name specified in the document.
See also:
http://www.w3.org/TR/xml11/#charencoding
template<class Tchar>
virtual void Mtx::SaxListenerT< Tchar >::mtxStartElement ( const Tchar *  name,
const Tchar **  attributes 
) [pure virtual]

Called when a start-tag or an empty element is parsed.

Parameters:
contextThe current context.
nameThe name of the element.
attributesThe attributes in this element, specified as a NULL-terminated name/value pointer pair array.
template<class Tchar>
virtual void Mtx::SaxListenerT< Tchar >::mtxEndElement ( const Tchar *  name) [pure virtual]

Called when an end-element or the end of an empty element is parsed.

Parameters:
contextThe current context.
nameThe name of the element.
template<class Tchar>
virtual void Mtx::SaxListenerT< Tchar >::mtxCharacters ( const Tchar *  data,
int  length 
) [pure virtual]

Called when character data is parsed.

May be called more than once per data section, so don't expect your data to be delivered in one piece.

Parameters:
contextThe current context.
dataThe character data.
lengthThe length, in characters, of the provided data.
template<class Tchar>
virtual void Mtx::SaxListenerT< Tchar >::mtxParseError ( int  offset) [pure virtual]

Called when the parser detects an error.

Parameters:
contextThe current context.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines