/* $Id$ * */ #ifndef __PJ_XML_H__ #define __PJ_XML_H__ /** * @file xml.h * @brief PJLIB XML Parser/Helper. */ #include #include PJ_BEGIN_DECL /** * @defgroup PJ_XML XML Parser/Helper. * @ingroup PJ * @{ */ /** Typedef for XML attribute. */ typedef struct pj_xml_attr pj_xml_attr; /** Typedef for XML nodes. */ typedef struct pj_xml_node pj_xml_node; /** This structure declares XML attribute. */ struct pj_xml_attr { PJ_DECL_LIST_MEMBER(pj_xml_attr) pj_str_t name; /**< Attribute name. */ pj_str_t value; /**< Attribute value. */ }; /** This structure describes XML node head inside XML node structure. */ typedef struct pj_xml_node_head { PJ_DECL_LIST_MEMBER(pj_xml_node) } pj_xml_node_head; /** This structure describes XML node. */ struct pj_xml_node { PJ_DECL_LIST_MEMBER(pj_xml_node) /** List @a prev and @a next member */ pj_str_t name; /** Node name. */ pj_xml_attr attr_head; /** Attribute list. */ pj_xml_node_head node_head; /** Node list. */ pj_str_t content; /** Node content. */ }; /** * Parse XML message into XML document with a single root node. The parser * is capable of parsing XML processing instruction construct ("