Files | |
file | wbxml_handlers.h |
WBXML Parser Handlers. | |
file | wbxml_parser.c |
WBXML Parser - Parse a WBXML document and call user defined Callbacks. | |
file | wbxml_parser.h |
WBXML Parser - Parse a WBXML document and call user defined Callbacks. | |
Compounds | |
struct | WBXMLContentHandler_s |
WBXMLContentHandler structure. More... | |
Typedefs | |
typedef void(* | WBXMLStartDocumentHandler )(void *ctx, WB_LONG charset, const WBXMLLangEntry *lang) |
Start Document Handler. | |
typedef void(* | WBXMLEndDocumentHandler )(void *ctx) |
End Document handler. | |
typedef void(* | WBXMLStartElementHandler )(void *ctx, WBXMLTag *localName, WBXMLAttribute **atts, WB_BOOL empty) |
Start Element handler. | |
typedef void(* | WBXMLEndElementHandler )(void *ctx, WBXMLTag *localName, WB_BOOL empty) |
End Element handler. | |
typedef void(* | WBXMLCharactersHandler )(void *ctx, WB_UTINY *ch, WB_ULONG start, WB_ULONG length) |
Characters handler. | |
typedef void(* | WBXMLProcessingInstructionHandler )(void *ctx, const WB_UTINY *target, WB_UTINY *data) |
Processing Instruction Handler. | |
typedef WBXMLContentHandler_s | WBXMLContentHandler |
WBXMLContentHandler structure. | |
typedef WBXMLParser_s | WBXMLParser |
Functions | |
WBXMLParser * | wbxml_parser_create (void) |
Create a WBXML Parser. | |
void | wbxml_parser_destroy (WBXMLParser *parser) |
Destroy a WBXML Parser. | |
WBXMLError | wbxml_parser_parse (WBXMLParser *parser, WB_UTINY *wbxml, WB_ULONG wbxml_len) |
Parse a WBXML document, using User Defined callbacks Return WBXML_OK if no error, an error code otherwise. | |
void | wbxml_parser_set_user_data (WBXMLParser *parser, void *user_data) |
Set User Data for a WBXML Parser. | |
void | wbxml_parser_set_content_handler (WBXMLParser *parser, WBXMLContentHandler *content_handler) |
Set Content Handler for a WBXML Parser. | |
void | wbxml_parser_set_main_table (WBXMLParser *parser, const WBXMLLangEntry *main_table) |
Set Main WBXML Languages Table. | |
unsigned char | wbxml_parser_set_language (WBXMLParser *parser, WBXMLLanguage lang) |
Force to parse the Document of a given Language. | |
unsigned int | wbxml_parser_get_wbxml_public_id (WBXMLParser *parser) |
Get WBXML Public ID. | |
const unsigned char * | wbxml_parser_get_xml_public_id (WBXMLParser *parser) |
Get XML Public ID. | |
WBXMLVersion | wbxml_parser_get_wbxml_version (WBXMLParser *parser) |
Get WBXML Version. | |
int | wbxml_parser_get_current_byte_index (WBXMLParser *parser) |
Return current parsing position in WBXML. |
|
Characters handler.
Definition at line 84 of file wbxml_handlers.h. |
|
WBXMLContentHandler structure.
|
|
End Document handler.
Definition at line 58 of file wbxml_handlers.h. |
|
End Element handler.
Definition at line 75 of file wbxml_handlers.h. |
|
Definition at line 46 of file wbxml_parser.h. |
|
Processing Instruction Handler.
Definition at line 93 of file wbxml_handlers.h. |
|
Start Document Handler.
Definition at line 52 of file wbxml_handlers.h. |
|
Start Element handler.
Definition at line 67 of file wbxml_handlers.h. |
|
Create a WBXML Parser.
Definition at line 176 of file wbxml_parser.c. References WBXMLParser_s::attrCodePage, WBXMLParser_s::charset, WBXMLParser_s::content_hdl, WBXMLParser_s::current_tag, WBXMLParser_s::lang_forced, WBXMLParser_s::langTable, WBXMLParser_s::mainTable, NULL, WBXMLParser_s::pos, WBXMLParser_s::public_id, WBXMLParser_s::public_id_index, WBXMLParser_s::strstbl, WBXMLParser_s::tagCodePage, WBXMLParser_s::user_data, WBXMLParser_s::version, WBXMLParser_s::wbxml, WBXML_LANG_UNKNOWN, wbxml_malloc(), WBXML_PUBLIC_ID_UNKNOWN, wbxml_tables_get_main(), and WBXML_VERSION_UNKNOWN. Referenced by wbxml_tree_from_wbxml(). |
|
Destroy a WBXML Parser.
Definition at line 210 of file wbxml_parser.c. References NULL, WBXMLParser_s::strstbl, WBXMLParser_s::wbxml, wbxml_buffer_destroy(), and wbxml_free(). Referenced by wbxml_tree_from_wbxml(). |
|
Return current parsing position in WBXML.
Definition at line 347 of file wbxml_parser.c. References NULL, WBXMLParser_s::pos, and WB_LONG. Referenced by wbxml_tree_from_wbxml(). |
|
Get WBXML Public ID.
Definition at line 320 of file wbxml_parser.c. References WBXMLParser_s::langTable, NULL, WBXMLLangEntry_s::publicID, WB_ULONG, WBXML_PUBLIC_ID_UNKNOWN, and WBXMLPublicIDEntry_s::wbxmlPublicID. |
|
Get WBXML Version.
Definition at line 338 of file wbxml_parser.c. References NULL, WBXMLParser_s::version, WBXML_VERSION_UNKNOWN, and WBXMLVersion. |
|
Get XML Public ID.
Definition at line 329 of file wbxml_parser.c. References WBXMLParser_s::langTable, NULL, WBXMLLangEntry_s::publicID, WB_UTINY, and WBXMLPublicIDEntry_s::xmlPublicID. |
|
Parse a WBXML document, using User Defined callbacks Return WBXML_OK if no error, an error code otherwise.
Referenced by wbxml_tree_from_wbxml(). |
|
Set Content Handler for a WBXML Parser.
Definition at line 295 of file wbxml_parser.c. References WBXMLParser_s::content_hdl, and NULL. Referenced by wbxml_tree_from_wbxml(). |
|
Force to parse the Document of a given Language.
Definition at line 309 of file wbxml_parser.c. References FALSE, WBXMLParser_s::lang_forced, NULL, TRUE, WB_BOOL, and WBXMLLanguage. Referenced by wbxml_tree_from_wbxml(). |
|
Set Main WBXML Languages Table.
Definition at line 302 of file wbxml_parser.c. References WBXMLParser_s::mainTable, and NULL. |
|
Set User Data for a WBXML Parser.
Definition at line 288 of file wbxml_parser.c. References NULL, and WBXMLParser_s::user_data. Referenced by wbxml_tree_from_wbxml(). |