25 #ifndef _XML_PARSER_H_ 26 #define _XML_PARSER_H_ 36 #define XML_CUB_NO_ERROR 0 37 #define XML_CUB_ERR_BASE 1 38 #define XML_CUB_SCHEMA_BROKEN (XML_CUB_ERR_BASE) 39 #define XML_CUB_OUT_OF_MEMORY (XML_CUB_ERR_BASE + 1) 40 #define XML_CUB_ERR_HEADER_ENCODING (XML_CUB_ERR_BASE + 2) 41 #define XML_CUB_ERR_FILE_READ (XML_CUB_ERR_BASE + 3) 42 #define XML_CUB_ERR_PARSER (XML_CUB_ERR_BASE + 4) 43 #define XML_CUB_ERR_FILE_MISSING (XML_CUB_ERR_BASE + 5) 44 #define XML_CUB_ERR_INCLUDE_LOOP (XML_CUB_ERR_BASE + 6) 45 #define XML_CUB_ERR_PARSER_INIT_FAIL (XML_CUB_ERR_BASE + 7) 48 #define MAX_ELEMENT_NAME 30 50 #define MAX_ENCODE_LEN 10 105 #define START_FUNC(el) (el->def->start_func) 106 #define END_FUNC(el) (el->def->end_func) 107 #define DATA_FUNC(el) (el->def->data_func) 109 #define XML_USER_DATA(xml) (xml->ud) 124 char filepath[PATH_MAX];
141 int xml_get_att_value (
const char **attrs,
const char *att_name,
char **p_att_value);
int xml_get_att_value(const char **attrs, const char *att_name, char **p_att_value)
void xml_parser_exec(XML_PARSER_DATA *pd)
int(* ELEM_START_FUNC)(void *, const char **)
XML_PARSER_DATA * xml_create_subparser(XML_PARSER_DATA *data, char *new_file)
int xml_check_att_value(const char **attrs, const char *att_name, const char *att_value)
ELEM_START_FUNC start_func
int count(int &result, const cub_regex_object ®, const std::string &src, const int position, const INTL_CODESET codeset)
void xml_destroy_parser(void *data)
int(* ELEM_DATA_FUNC)(void *, const char *, int)
int(* ELEM_END_FUNC)(void *, const char *)
void xml_destroy_parser_data(void *data)
XML_Parser xml_init_parser(void *data, const char *xml_file, const char *encoding, XML_ELEMENT_DEF **element_array, const int count)