#include <MTXml/MTXml.h>
You must set all the callbacks before calling mtxFeed().
Public Attributes | |
void(* | encoding )(MTXContext *context, const char *value) |
void(* | tagStart )(MTXContext *context, const char *name, int len) |
void(* | tagAttr )(MTXContext *context, const char *attrName, const char *attrValue) |
void(* | tagStartEnd )(MTXContext *context) |
void(* | tagData )(MTXContext *context, const char *data, int len) |
void(* | tagEnd )(MTXContext *context, const char *name, int len) |
void(* | emptyTagEnd )(MTXContext *context) |
void(* | dataRemains )(MTXContext *context, const char *data, int len) |
void(* | parseError )(MTXContext *context) |
unsigned char(* | unicodeCharacter )(MTXContext *context, int unicode) |
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 is parsed.
|
|
Called when a tag attribute is parsed. |
|
Called when the end bracket of the most recent start-tag 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 when an end-tag is parsed.
|
|
Called at the end of an empty-element tag. This marks the end of the tag most recently reported by tagStart(). |
|
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. |
|
Called during UTF-8 processing, when a character, whose encoding is longer than 8 bits, is encountered. This function returns an 8-bit representation of that Unicode character. This function may return zero. If so, a parse error is generated. |
|
A value you can set to anything you like. If you're parsing more than one file at a time, this can be useful to distinguish the callbacks. |