00001
00035 #ifndef ELEMENT_H_ALEIX0211250048
00036 #define ELEMENT_H_ALEIX0211250048
00037
00038 #include "types.h"
00039
00040 #include <expat.h>
00041
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00050 extern scew_element*
00051 scew_element_create(XML_Char const* name);
00052
00057 extern void
00058 scew_element_free(scew_element* element);
00059
00064 extern unsigned int
00065 scew_element_count(scew_element const* element);
00066
00074 extern scew_element*
00075 scew_element_by_index(scew_element const* parent, unsigned int idx);
00076
00084 extern scew_element*
00085 scew_element_by_name(scew_element const* parent, XML_Char const* name);
00086
00093 extern scew_element**
00094 scew_element_list(scew_element const* parent, XML_Char const* name,
00095 unsigned int* count);
00096
00100 extern void
00101 scew_element_list_free(scew_element** xlist);
00102
00106 extern XML_Char const*
00107 scew_element_name(scew_element const* element);
00108
00113 extern XML_Char const*
00114 scew_element_contents(scew_element const* element);
00115
00121 extern XML_Char const*
00122 scew_element_set_name(scew_element* element, XML_Char const* name);
00123
00129 extern XML_Char const*
00130 scew_element_set_contents(scew_element* element, XML_Char const* data);
00131
00137 extern scew_element*
00138 scew_element_add(scew_element* element, XML_Char const* name);
00139
00151 extern scew_element*
00152 scew_element_add_elem(scew_element* element, scew_element* new_elem);
00153
00159 extern void
00160 scew_element_del(scew_element* element);
00161
00166 extern void
00167 scew_element_del_by_name(scew_element* element, XML_Char const* name);
00168
00172 extern void
00173 scew_element_del_by_index(scew_element* element, unsigned int idx);
00174
00184 extern void
00185 scew_element_list_del(scew_element* element, XML_Char const* name);
00186
00197 scew_attribute*
00198 scew_element_add_attr(scew_element* element, scew_attribute* attribute);
00199
00209 extern scew_attribute*
00210 scew_element_add_attr_pair(scew_element* element,
00211 XML_Char const* name, XML_Char const* value);
00212
00216 extern void
00217 scew_element_del_attr(scew_element* element, XML_Char const* name);
00218
00219 #ifdef __cplusplus
00220 }
00221 #endif
00222
00223 #endif