EFL 1.7 svn doobies
[profile/ivi/efreet.git] / src / lib / efreet_xml.h
1 #ifndef EFREET_XML_H
2 #define EFREET_XML_H
3
4 /**
5  * @internal
6  * @file efreet_xml.h
7  * @brief A simple and fast XML parser
8  * @addtogroup Efreet_Xml Efreet_Xml: An XML parser
9  *
10  * @{
11  */
12
13 /**
14  * Efreet_Xml_Attributes
15  */
16 typedef struct Efreet_Xml_Attribute Efreet_Xml_Attribute;
17
18 /**
19  * Efreet_Xml_Attributes
20  * @brief Contains information about a given XML attribute
21  */
22 struct Efreet_Xml_Attribute
23 {
24     const char *key;        /**< The attribute key */
25     const char *value;      /**< The attribute value */
26 };
27
28 /**
29  * Efreet_Xml
30  */
31 typedef struct Efreet_Xml Efreet_Xml;
32
33 /**
34  * Efreet_Xml
35  * @brief Contains the XML tree for a given XML document
36  */
37 struct Efreet_Xml
38 {
39     const char *text;                   /**< The XML text for this node */
40     const char *tag;                    /**< The tag for this node */
41
42     Efreet_Xml_Attribute **attributes;  /**< The attributes for this node */
43
44     Eina_List *children;               /**< Child nodes */
45 };
46
47 int efreet_xml_init(void);
48 void efreet_xml_shutdown(void);
49
50 Efreet_Xml *efreet_xml_new(const char *file);
51 void efreet_xml_del(Efreet_Xml *xml);
52
53 const char *efreet_xml_attribute_get(Efreet_Xml *xml, const char *key);
54
55 /**
56  * @}
57  */
58
59 #endif