1 #ifndef ACL_XML3_INCLUDE_H 2 #define ACL_XML3_INCLUDE_H 8 #include "../stdlib/acl_array.h" 9 #include "../stdlib/acl_ring.h" 10 #include "../stdlib/acl_vstream.h" 11 #include "../stdlib/acl_htable.h" 12 #include "../stdlib/acl_vstring.h" 13 #include "../stdlib/acl_iterator.h" 14 #include "../stdlib/acl_dbuf_pool.h" 59 #define ACL_XML3_F_META_QM (1 << 0) 60 #define ACL_XML3_F_META_CM (1 << 1) 61 #define ACL_XML3_F_META_EM (1 << 2) 62 #define ACL_XML3_F_SELF_CL (1 << 3) 63 #define ACL_XML3_F_LEAF (1 << 4) 66 #define ACL_XML3_F_META \ 67 (ACL_XML3_F_META_QM | ACL_XML3_F_META_CM | ACL_XML3_F_META_EM) 69 #define ACL_XML3_IS_COMMENT(x) (((x)->flag & ACL_XML3_F_META_CM)) 72 #define ACL_XML3_S_NXT 0 73 #define ACL_XML3_S_LLT 1 74 #define ACL_XML3_S_LGT 2 75 #define ACL_XML3_S_LCH 3 76 #define ACL_XML3_S_LEM 4 77 #define ACL_XML3_S_LTAG 5 78 #define ACL_XML3_S_RLT 6 79 #define ACL_XML3_S_RGT 7 80 #define ACL_XML3_S_RTAG 8 81 #define ACL_XML3_S_ATTR 9 82 #define ACL_XML3_S_AVAL 10 83 #define ACL_XML3_S_TXT 11 84 #define ACL_XML3_S_MTAG 12 85 #define ACL_XML3_S_MTXT 13 86 #define ACL_XML3_S_MCMT 14 87 #define ACL_XML3_S_MEND 15 120 #define ACL_XML3_FLAG_MULTI_ROOT (1 << 0) 123 #define ACL_XML3_FLAG_IGNORE_SLASH (1 << 1) 229 #define acl_xml3_parse acl_xml3_update 322 const char *
name,
const char *value);
411 const char *
name,
const char *value);
422 const char *tagname,
const char *text);
433 const char *
name,
const char *value);
441 ACL_API
void acl_xml3_node_add_attrs(
ACL_XML3_NODE *node, ...);
448 ACL_API
void acl_xml3_node_set_text(
ACL_XML3_NODE *node,
const char *text);
ACL_API char * acl_xml3_update(ACL_XML3 *xml, char *data)
ACL_API ACL_XML3_NODE * acl_xml3_node_prev(ACL_XML3_NODE *node)
ACL_API void acl_xml3_node_append(ACL_XML3_NODE *node1, ACL_XML3_NODE *node2)
ACL_API ACL_XML3_ATTR * acl_xml3_getAttrById(ACL_XML3 *xml, const char *id)
HTTP_API void const char * name
ACL_API ACL_XML3_NODE * acl_xml3_node_next(ACL_XML3_NODE *node)
ACL_API ACL_ARRAY * acl_xml3_getElementsByTags(ACL_XML3 *xml, const char *tags)
ACL_API void acl_xml3_slash(ACL_XML3 *xml, int ignore)
ACL_API int acl_xml3_is_closure(ACL_XML3 *xml)
ACL_API void acl_xml3_reset(ACL_XML3 *xml)
ACL_API ACL_XML3_ATTR * acl_xml3_getElementAttr(ACL_XML3_NODE *node, const char *name)
ACL_API void acl_xml3_free_array(ACL_ARRAY *a)
ACL_API void acl_xml3_node_add_child(ACL_XML3_NODE *parent, ACL_XML3_NODE *child)
ACL_XML3_ATTR * curr_attr
ACL_API ACL_ARRAY * acl_xml3_getElementsByTagName(ACL_XML3 *xml, const char *tag)
ACL_API ACL_XML3_NODE * acl_xml3_getFirstElementByTagName(ACL_XML3 *xml, const char *tag)
ACL_API int acl_xml3_tag_selfclosed(const char *tag)
ACL_API ACL_XML3 * acl_xml3_alloc(void)
ACL_API ACL_ARRAY * acl_xml3_getElementsByName(ACL_XML3 *xml, const char *value)
ACL_API ACL_XML3_NODE * acl_xml3_node_alloc(ACL_XML3 *xml)
ACL_API void acl_xml3_multi_root(ACL_XML3 *xml, int on)
ACL_API const char * acl_xml3_getElementAttrVal(ACL_XML3_NODE *node, const char *name)
ACL_API ACL_XML3_NODE * acl_xml3_node_parent(ACL_XML3_NODE *node)
ACL_API int acl_xml3_tag_leaf(const char *tag)
ACL_DBUF_POOL * dbuf_inner
ACL_API int acl_xml3_free(ACL_XML3 *xml)
struct ACL_DBUF_POOL ACL_DBUF_POOL
ACL_API void acl_xml3_tag_add(const char *tag)
ACL_XML3_NODE * curr_node
ACL_API const char * acl_xml3_getAttrValueById(ACL_XML3 *xml, const char *id)
ACL_API ACL_XML3_ATTR * acl_xml3_attr_alloc(ACL_XML3_NODE *node)
ACL_API ACL_XML3 * acl_xml3_dbuf_alloc(ACL_DBUF_POOL *dbuf)
ACL_API const char * acl_xml3_getEncoding(ACL_XML3 *xml)
ACL_API int acl_xml3_is_complete(ACL_XML3 *xml, const char *tag)
ACL_API void acl_xml3_tag_init(void)
ACL_API void acl_xml3_foreach_init(ACL_XML3 *xml, ACL_XML3_NODE *node)
ACL_API ACL_ARRAY * acl_xml3_getElementsByAttr(ACL_XML3 *xml, const char *name, const char *value)
ACL_API const char * acl_xml3_getType(ACL_XML3 *xml)
ACL_API int acl_xml3_node_delete(ACL_XML3_NODE *node)
ACL_API ACL_XML3_NODE * acl_xml3_getElementMeta(ACL_XML3 *xml, const char *tag)
ACL_API ACL_XML3_NODE * acl_xml3_getElementById(ACL_XML3 *xml, const char *id)
ACL_API int acl_xml3_removeElementAttr(ACL_XML3_NODE *node, const char *name)