MoSync 3.3
Mtx::SaxListener Class Reference

8-bit SAX parser callback interface. More...

#include <MTXml/MTSax.h>

Inheritance diagram for Mtx::SaxListener:
Mtx::SaxListenerT< char >

List of all members.

Public Member Functions

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

Detailed Description

8-bit SAX parser callback interface.


Member Function Documentation

virtual unsigned char Mtx::SaxListener::mtxUnicodeCharacter ( int  character) [pure virtual]

Called during UTF-8 processing when a character is encountered whose encoding is longer than 8 bits.

This function returns an 8-bit representation of that Unicode character. This function may return zero. If so, the mtxBasicUnicodeConvert function is called. If that too returns zero, a parse error is generated.

Parameters:
contextThe current context.
characterThe Unicode code point to convert.
virtual void Mtx::SaxListenerT< char >::mtxEncoding ( const char *  value) [pure virtual, inherited]

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
virtual void Mtx::SaxListenerT< char >::mtxStartElement ( const char *  name,
const char **  attributes 
) [pure virtual, inherited]

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.
virtual void Mtx::SaxListenerT< char >::mtxEndElement ( const char *  name) [pure virtual, inherited]

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

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

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.
virtual void Mtx::SaxListenerT< char >::mtxParseError ( int  offset) [pure virtual, inherited]

Called when the parser detects an error.

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