Files | |
file | wbxml_tree.c |
WBXML Tree. | |
file | wbxml_tree.h |
WBXML Tree. | |
file | wbxml_tree_clb_wbxml.c |
WBXML Tree Callbacks for WBXML Parser. | |
file | wbxml_tree_clb_wbxml.h |
WBXML Tree Callbacks for WBXML Parser. | |
file | wbxml_tree_clb_xml.c |
WBXML Tree Callbacks for XML Parser (Expat). | |
file | wbxml_tree_clb_xml.h |
WBXML Tree Callbacks for XML Parser (Expat). | |
Compounds | |
struct | WBXMLTree_s |
WBXML Tree structure. More... | |
struct | WBXMLTreeAttribute_s |
WBXML Tree Attribute structure. More... | |
struct | WBXMLTreeClbCtx_s |
struct | WBXMLTreeNode_s |
WBXML Tree Node structure. More... | |
Typedefs | |
typedef enum WBXMLTreeNodeType_e | WBXMLTreeNodeType |
WBXML Tree Node Type. | |
typedef WBXMLTreeAttribute_s | WBXMLTreeAttribute |
WBXML Tree Attribute structure. | |
typedef WBXMLTreeNode_s | WBXMLTreeNode |
WBXML Tree Node structure. | |
typedef WBXMLTree_s | WBXMLTree |
WBXML Tree structure. | |
typedef WBXMLTreeClbCtx_s | WBXMLTreeClbCtx |
Enumerations | |
enum | WBXMLTreeNodeType_e { WBXML_TREE_ELEMENT_NODE = 0, WBXML_TREE_TEXT_NODE, WBXML_TREE_PI_NODE, WBXML_TREE_TREE_NODE } |
WBXML Tree Node Type. More... | |
Functions | |
WBXMLError | wbxml_tree_from_wbxml (WB_UTINY *wbxml, WB_ULONG wbxml_len, WBXMLLanguage lang, WBXMLTree **tree) |
Parse a WBXML document, using internal callbacks, and construct a WBXML Tree. | |
WBXMLError | wbxml_tree_from_xml (WB_UTINY *xml, WBXMLTree **tree) |
Parse an XML document, using internal callbacks, and construct a WBXML Tree. | |
WBXMLTreeAttribute * | wbxml_tree_attribute_create (void) |
Create a Tree Attribute structure. | |
void | wbxml_tree_attribute_destroy (WBXMLTreeAttribute *attr) |
Destroy a Tree Attribute structure. | |
WBXMLTreeNode * | wbxml_tree_node_create (WBXMLTreeNodeType type) |
Create a Tree Node structure. | |
void | wbxml_tree_node_destroy (WBXMLTreeNode *node) |
Destroy a Tree Node structure. | |
WBXMLTree * | wbxml_tree_create (void) |
Create a Tree structure. | |
void | wbxml_tree_destroy (WBXMLTree *tree) |
Destroy a Tree structure. | |
WBXMLTreeNode * | wbxml_tree_get_element_node_from_name (WBXMLTreeNode *node, const char *name, WB_BOOL recurs) |
Get an Element Node, given the Element Name. | |
void | wbxml_tree_clb_wbxml_start_document (void *ctx, WB_LONG charset, const WBXMLLangEntry *lang) |
Start Document Callback. | |
void | wbxml_tree_clb_wbxml_end_document (void *ctx) |
End Document Callback. | |
void | wbxml_tree_clb_wbxml_start_element (void *ctx, WBXMLTag *element, WBXMLAttribute **atts, WB_BOOL empty) |
Start Element Callback. | |
void | wbxml_tree_clb_wbxml_end_element (void *ctx, WBXMLTag *element, WB_BOOL empty) |
End Element Callback. | |
void | wbxml_tree_clb_wbxml_characters (void *ctx, WB_UTINY *ch, WB_ULONG start, WB_ULONG length) |
Characters Callback. | |
void | wbxml_tree_clb_wbxml_pi (void *ctx, const WB_UTINY *target, WB_UTINY *data) |
Processing Instruction Callback. | |
void | wbxml_tree_clb_xml_doctype_decl (void *ctx, const XML_Char *doctypeName, const XML_Char *sysid, const XML_Char *pubid, int has_internal_subset) |
Doctype Declaration Callback. | |
void | wbxml_tree_clb_xml_start_element (void *ctx, const XML_Char *localName, const XML_Char **attrs) |
Start Element Callback. | |
void | wbxml_tree_clb_xml_end_element (void *ctx, const XML_Char *localName) |
End Element Callback. | |
void | wbxml_tree_clb_xml_start_cdata (void *ctx) |
Start of CDATA Section Callback. | |
void | wbxml_tree_clb_xml_end_cdata (void *ctx) |
End of CDATA Section Callback. | |
void | wbxml_tree_clb_xml_characters (void *ctx, const XML_Char *ch, int len) |
Characters Callback. | |
void | wbxml_tree_clb_xml_pi (void *ctx, const XML_Char *target, const XML_Char *data) |
Processing Instruction Callback. |
|
WBXML Tree structure.
|
|
WBXML Tree Attribute structure.
|
|
WBXML Tree Clb Context Structure
|
|
WBXML Tree Node structure.
|
|
WBXML Tree Node Type.
Referenced by wbxml_tree_node_create(). |
|
WBXML Tree Node Type.
Definition at line 55 of file wbxml_tree.h. |
|
Create a Tree Attribute structure.
Definition at line 191 of file wbxml_tree.c. References WBXMLTreeAttribute_s::attr, WBXMLTreeAttribute_s::next, NULL, and wbxml_malloc(). |
|
Destroy a Tree Attribute structure.
Definition at line 205 of file wbxml_tree.c. References WBXMLTreeAttribute_s::attr, WBXMLTreeAttribute_s::next, NULL, wbxml_attribute_destroy(), and wbxml_free(). Referenced by wbxml_tree_node_destroy(). |
|
Characters Callback.
|
|
End Document Callback.
Definition at line 70 of file wbxml_tree_clb_wbxml.c. References WBXMLTreeClbCtx_s::error, and WBXML_OK. |
|
End Element Callback.
|
|
Processing Instruction Callback.
|
|
Start Document Callback.
|
|
Start Element Callback.
|
|
Characters Callback.
Definition at line 282 of file wbxml_tree_clb_xml.c. References add_node_to_tree(), WBXMLTreeNode_s::content, WBXMLTreeClbCtx_s::current, WBXMLTreeClbCtx_s::error, NULL, WBXMLTreeNode_s::parent, WBXMLTreeClbCtx_s::skip_lvl, wbxml_buffer_create, WBXML_ERROR_NOT_ENOUGH_MEMORY, WBXML_OK, wbxml_tree_node_create(), wbxml_tree_node_destroy(), and WBXML_TREE_TEXT_NODE. |
|
Doctype Declaration Callback.
Definition at line 49 of file wbxml_tree_clb_xml.c. References WBXMLTree_s::lang, NULL, WBXMLTreeClbCtx_s::tree, WB_UTINY, wbxml_tables_get_main(), wbxml_tables_search_table(), and WBXML_WARNING. |
|
End of CDATA Section Callback.
Definition at line 267 of file wbxml_tree_clb_xml.c. References WBXMLTreeClbCtx_s::error, WBXMLTreeClbCtx_s::skip_lvl, and WBXML_OK. |
|
End Element Callback.
Definition at line 163 of file wbxml_tree_clb_xml.c. References add_node_to_tree(), WBXMLTreeClbCtx_s::current, WBXMLTreeClbCtx_s::error, WBXMLTreeClbCtx_s::input_buff, NULL, WBXMLTreeNode_s::parent, WBXMLTree_s::root, WBXMLTreeClbCtx_s::skip_lvl, WBXMLTreeClbCtx_s::skip_start, WBXMLTreeNode_s::tree, WBXMLTreeClbCtx_s::tree, wbxml_buffer_append_cstr, wbxml_buffer_create, wbxml_buffer_destroy(), wbxml_buffer_get_cstr(), WBXML_DEBUG, WBXML_ERROR_INTERNAL, WBXML_ERROR_NOT_ENOUGH_MEMORY, WBXML_OK, WBXML_STRCMP, wbxml_tree_destroy(), wbxml_tree_from_xml(), wbxml_tree_node_create(), WBXML_TREE_TREE_NODE, WBXMLError, and WBXMLTreeClbCtx_s::xml_parser. |
|
Processing Instruction Callback.
Definition at line 316 of file wbxml_tree_clb_xml.c. References WBXMLTreeClbCtx_s::error, WBXMLTreeClbCtx_s::skip_lvl, and WBXML_OK. |
|
Start of CDATA Section Callback.
Definition at line 251 of file wbxml_tree_clb_xml.c. References WBXMLTreeClbCtx_s::error, WBXMLTreeClbCtx_s::skip_lvl, and WBXML_OK. |
|
Start Element Callback.
Definition at line 73 of file wbxml_tree_clb_xml.c. References add_node_to_tree(), WBXMLTreeNode_s::attrs, construct_attribute_list(), WBXMLTreeClbCtx_s::current, WBXMLTreeClbCtx_s::error, WBXMLTree_s::lang, WBXMLTreeNode_s::name, NULL, WBXMLTreeClbCtx_s::skip_lvl, WBXMLTreeClbCtx_s::skip_start, WBXMLTreeClbCtx_s::tree, WB_UTINY, WBXML_ERROR_NOT_ENOUGH_MEMORY, WBXML_ERROR_UNKNOWN_XML_LANGUAGE, WBXML_OK, WBXML_STRCMP, wbxml_tables_get_main(), wbxml_tables_get_tag_from_xml(), wbxml_tables_search_table(), wbxml_tag_create_literal(), wbxml_tag_create_token(), wbxml_tag_destroy(), WBXML_TREE_ELEMENT_NODE, wbxml_tree_node_create(), wbxml_tree_node_destroy(), and WBXMLTreeClbCtx_s::xml_parser. |
|
Create a Tree structure.
Definition at line 261 of file wbxml_tree.c. References WBXMLTree_s::lang, NULL, WBXMLTree_s::root, and wbxml_malloc(). Referenced by wbxml_tree_from_wbxml(), and wbxml_tree_from_xml(). |
|
Destroy a Tree structure.
Definition at line 275 of file wbxml_tree.c. References WBXMLTreeNode_s::children, FALSE, WBXMLTreeNode_s::next, NULL, WBXMLTreeNode_s::parent, WBXMLTree_s::root, TRUE, WB_BOOL, wbxml_free(), and wbxml_tree_node_destroy(). Referenced by wbxml_conv_wbxml2xml(), wbxml_conv_xml2wbxml(), wbxml_tree_clb_wbxml_characters(), wbxml_tree_clb_xml_end_element(), wbxml_tree_from_wbxml(), wbxml_tree_from_xml(), and wbxml_tree_node_destroy(). |
|
Parse a WBXML document, using internal callbacks, and construct a WBXML Tree.
Referenced by wbxml_conv_wbxml2xml(), and wbxml_tree_clb_wbxml_characters(). |
|
Parse an XML document, using internal callbacks, and construct a WBXML Tree.
Referenced by wbxml_conv_xml2wbxml(), and wbxml_tree_clb_xml_end_element(). |
|
Get an Element Node, given the Element Name.
|
|
Create a Tree Node structure.
Definition at line 223 of file wbxml_tree.c. References WBXMLTreeNode_s::attrs, WBXMLTreeNode_s::children, WBXMLTreeNode_s::content, WBXMLTreeNode_s::name, WBXMLTreeNode_s::next, NULL, WBXMLTreeNode_s::parent, WBXMLTreeNode_s::prev, WBXMLTreeNode_s::tree, WBXMLTreeNode_s::type, wbxml_malloc(), and WBXMLTreeNodeType. Referenced by wbxml_tree_clb_wbxml_characters(), wbxml_tree_clb_wbxml_start_element(), wbxml_tree_clb_xml_characters(), wbxml_tree_clb_xml_end_element(), and wbxml_tree_clb_xml_start_element(). |
|
Destroy a Tree Node structure.
Definition at line 245 of file wbxml_tree.c. References WBXMLTreeNode_s::attrs, WBXMLTreeNode_s::content, WBXMLTreeNode_s::name, NULL, WBXMLTreeNode_s::tree, wbxml_buffer_destroy(), wbxml_free(), wbxml_tag_destroy(), wbxml_tree_attribute_destroy(), and wbxml_tree_destroy(). Referenced by wbxml_tree_clb_wbxml_characters(), wbxml_tree_clb_wbxml_start_element(), wbxml_tree_clb_xml_characters(), wbxml_tree_clb_xml_start_element(), and wbxml_tree_destroy(). |