CUBRID Engine  latest
xml_parser.h File Reference
#include "config.h"
#include "porting.h"
#include "expat.h"
Include dependency graph for xml_parser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  xml_element_def
 
struct  xml_element
 
struct  xml_parser_data
 

Macros

#define XML_STATIC
 
#define XML_CUB_NO_ERROR   0
 
#define XML_CUB_ERR_BASE   1
 
#define XML_CUB_SCHEMA_BROKEN   (XML_CUB_ERR_BASE)
 
#define XML_CUB_OUT_OF_MEMORY   (XML_CUB_ERR_BASE + 1)
 
#define XML_CUB_ERR_HEADER_ENCODING   (XML_CUB_ERR_BASE + 2)
 
#define XML_CUB_ERR_FILE_READ   (XML_CUB_ERR_BASE + 3)
 
#define XML_CUB_ERR_PARSER   (XML_CUB_ERR_BASE + 4)
 
#define XML_CUB_ERR_FILE_MISSING   (XML_CUB_ERR_BASE + 5)
 
#define XML_CUB_ERR_INCLUDE_LOOP   (XML_CUB_ERR_BASE + 6)
 
#define XML_CUB_ERR_PARSER_INIT_FAIL   (XML_CUB_ERR_BASE + 7)
 
#define MAX_ELEMENT_NAME   30
 
#define MAX_ENCODE_LEN   10
 
#define START_FUNC(el)   (el->def->start_func)
 
#define END_FUNC(el)   (el->def->end_func)
 
#define DATA_FUNC(el)   (el->def->data_func)
 
#define XML_USER_DATA(xml)   (xml->ud)
 

Typedefs

typedef int(* ELEM_START_FUNC) (void *, const char **)
 
typedef int(* ELEM_END_FUNC) (void *, const char *)
 
typedef int(* ELEM_DATA_FUNC) (void *, const char *, int)
 
typedef struct xml_element_def XML_ELEMENT_DEF
 
typedef struct xml_element XML_ELEMENT
 
typedef struct xml_parser_data XML_PARSER_DATA
 

Functions

XML_Parser xml_init_parser (void *data, const char *xml_file, const char *encoding, XML_ELEMENT_DEF **element_array, const int count)
 
void xml_destroy_parser (void *data)
 
void xml_destroy_parser_data (void *data)
 
void xml_parser_exec (XML_PARSER_DATA *pd)
 
int xml_check_att_value (const char **attrs, const char *att_name, const char *att_value)
 
int xml_get_att_value (const char **attrs, const char *att_name, char **p_att_value)
 
XML_PARSER_DATAxml_create_subparser (XML_PARSER_DATA *data, char *new_file)
 

Macro Definition Documentation

#define DATA_FUNC (   el)    (el->def->data_func)

Definition at line 107 of file xml_parser.h.

Referenced by xml_data_handler(), and xml_elem_start().

#define END_FUNC (   el)    (el->def->end_func)

Definition at line 106 of file xml_parser.h.

Referenced by xml_elem_end().

#define MAX_ELEMENT_NAME   30

Definition at line 48 of file xml_parser.h.

Referenced by add_xml_element().

#define MAX_ENCODE_LEN   10

Definition at line 50 of file xml_parser.h.

Referenced by xml_init_parser_common().

#define START_FUNC (   el)    (el->def->start_func)

Definition at line 105 of file xml_parser.h.

Referenced by xml_elem_start().

#define XML_CUB_ERR_BASE   1

Definition at line 37 of file xml_parser.h.

#define XML_CUB_ERR_FILE_MISSING   (XML_CUB_ERR_BASE + 5)

Definition at line 43 of file xml_parser.h.

Referenced by start_include_collation(), and xml_parser_exec().

#define XML_CUB_ERR_FILE_READ   (XML_CUB_ERR_BASE + 3)

Definition at line 41 of file xml_parser.h.

Referenced by xml_parse().

#define XML_CUB_ERR_HEADER_ENCODING   (XML_CUB_ERR_BASE + 2)

Definition at line 40 of file xml_parser.h.

Referenced by xml_header_validation_utf8().

#define XML_CUB_ERR_INCLUDE_LOOP   (XML_CUB_ERR_BASE + 6)

Definition at line 44 of file xml_parser.h.

Referenced by start_include_collation(), and xml_create_subparser().

#define XML_CUB_ERR_PARSER_INIT_FAIL   (XML_CUB_ERR_BASE + 7)
#define XML_CUB_SCHEMA_BROKEN   (XML_CUB_ERR_BASE)

Definition at line 38 of file xml_parser.h.

Referenced by add_xml_element().

#define XML_STATIC

Definition at line 33 of file xml_parser.h.

Typedef Documentation

typedef int(* ELEM_DATA_FUNC) (void *, const char *, int)

Definition at line 81 of file xml_parser.h.

typedef int(* ELEM_END_FUNC) (void *, const char *)

Definition at line 70 of file xml_parser.h.

typedef int(* ELEM_START_FUNC) (void *, const char **)

Definition at line 60 of file xml_parser.h.

typedef struct xml_element XML_ELEMENT

Definition at line 93 of file xml_parser.h.

Definition at line 83 of file xml_parser.h.

Definition at line 111 of file xml_parser.h.

Function Documentation

int xml_check_att_value ( const char **  attrs,
const char *  att_name,
const char *  att_value 
)

Definition at line 1152 of file xml_parser.c.

References assert, and NULL.

Referenced by start_calendar(), start_calendar_name_context(), start_dayPeriodWidth(), start_month_day_Width(), and start_numbers_symbols().

Here is the caller graph for this function:

void xml_destroy_parser ( void *  data)

Definition at line 977 of file xml_parser.c.

References xml_parser_data::next, NULL, and xml_destroy_parser_data().

Referenced by locale_compile_locale(), and tzc_summary().

Here is the caller graph for this function:

void xml_destroy_parser_data ( void *  data)

Definition at line 1067 of file xml_parser.c.

References xml_parser_data::buf, NULL, xml_parser_data::sc, xml_destroy_schema_tree(), and xml_parser_data::xml_parser.

Referenced by start_include_collation(), xml_create_subparser(), and xml_destroy_parser().

Here is the caller graph for this function:

int xml_get_att_value ( const char **  attrs,
const char *  att_name,
char **  p_att_value 
)
XML_Parser xml_init_parser ( void *  data,
const char *  xml_file,
const char *  encoding,
XML_ELEMENT_DEF **  element_array,
const int  count 
)
void xml_parser_exec ( XML_PARSER_DATA pd)