#include <MTXml/MTSax.h>
You must set all the callbacks before calling mtxSaxStart().
Public Attributes | |
void(* | encoding )(MTXSaxContext_t *context, const char *value) |
void(* | startElement )(MTXSaxContext_t *context, const char *name, const char **attributes) |
void(* | endElement )(MTXSaxContext_t *context, const char *name) |
void(* | characters )(MTXSaxContext_t *context, const char *data, int length) |
unsigned char(* | unicodeCharacter )(MTXSaxContext_t *context, int character) |
void(* | dataRemains )(MTXSaxContext_t *context, const char *data, int length) |
void(* | parseError )(MTXSaxContext_t *context) |
void * | userData |
|
If the "encoding" attribute is present in the "?xml" tag, this function is called. The default encoding is UTF-8.
|
|
Called when a start-tag or an empty element is parsed.
|
|
Called when an end-element or the end of an empty element is parsed.
|
|
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.
|
|
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.
|
|
Called when some data at the end of the supplied buffer couldn't be completely parsed. Prepend it to your next feed.
|
|
Called when the parser detects an error.
|
|
A value you can set to anything you like. If you're parsing more than one document at a time, this can be a useful way to distinguish them. |