Simple C Expat Wrapper (SCEW)
1.1.7
|
SCEW element's handling routines. More...
Go to the source code of this file.
Typedefs | |
typedef struct scew_element | scew_element |
This is the type delcaration for SCEW elements. | |
typedef struct scew_attribute | scew_attribute |
This is the type declaration for SCEW attributes. | |
typedef scew_bool(* | scew_element_cmp_hook )(scew_element const *, scew_element const *) |
SCEW element compare hooks might be used to define new user XML element comparisons. More... | |
Functions | |
SCEW_API scew_element * | scew_element_create (XML_Char const *name) |
Creates a new element with the given name. More... | |
SCEW_API scew_element * | scew_element_copy (scew_element const *element) |
Makes a deep copy of the given element. More... | |
SCEW_API void | scew_element_free (scew_element *element) |
Frees the given element recursively. More... | |
SCEW_API scew_element * | scew_element_by_name (scew_element const *element, XML_Char const *name) |
Returns the first child from the specified element that matches the given name. More... | |
SCEW_API scew_element * | scew_element_by_index (scew_element const *element, unsigned int index) |
Returns the child of the given element at the specified zero-based index. More... | |
SCEW_API scew_list * | scew_element_list_by_name (scew_element const *element, XML_Char const *name) |
Returns a list of children from the specified element that matches the given name. More... | |
SCEW_API scew_bool | scew_element_compare (scew_element const *a, scew_element const *b, scew_element_cmp_hook hook) |
Performs a deep comparison of the two given elements. More... | |
SCEW_API XML_Char const * | scew_element_name (scew_element const *element) |
Returns the given element's name. More... | |
SCEW_API XML_Char const * | scew_element_contents (scew_element const *element) |
Returns the given element's contents. More... | |
SCEW_API XML_Char const * | scew_element_set_name (scew_element *element, XML_Char const *name) |
Sets a new name to the given element and frees the old one. More... | |
SCEW_API XML_Char const * | scew_element_set_contents (scew_element *element, XML_Char const *contents) |
Sets a new contents to the given element and frees the old one. More... | |
SCEW_API void | scew_element_free_contents (scew_element *element) |
Frees the current contents of the given element. More... | |
SCEW_API unsigned int | scew_element_count (scew_element const *element) |
Returns the number of children of the specified element. More... | |
SCEW_API scew_element * | scew_element_parent (scew_element const *element) |
Returns the parent of the given element. More... | |
SCEW_API scew_list * | scew_element_children (scew_element const *element) |
Returns the list of all the element's children. More... | |
SCEW_API scew_element * | scew_element_add (scew_element *element, XML_Char const *name) |
Creates and adds, as a child of element, a new element with the given name. More... | |
SCEW_API scew_element * | scew_element_add_pair (scew_element *element, XML_Char const *name, XML_Char const *contents) |
Creates and adds, as a child of element, a new element with the given name and contents. More... | |
SCEW_API scew_element * | scew_element_add_element (scew_element *element, scew_element *child) |
Adds a child to the given element. More... | |
SCEW_API void | scew_element_delete_all (scew_element *element) |
Deletes all the children for the given element. More... | |
SCEW_API void | scew_element_delete_all_by_name (scew_element *element, XML_Char const *name) |
Deletes all the children of the given element that matches name. More... | |
SCEW_API void | scew_element_delete_by_name (scew_element *element, XML_Char const *name) |
Deletes the first child of the given element that matches name. More... | |
SCEW_API void | scew_element_delete_by_index (scew_element *element, unsigned int index) |
Deletes the child of the given element at the specified zero-based index. More... | |
SCEW_API void | scew_element_detach (scew_element *element) |
Detaches the given element from its parent, if any. More... | |
SCEW_API unsigned int | scew_element_attribute_count (scew_element const *element) |
Returns the number of attributes of the given element. More... | |
SCEW_API scew_list * | scew_element_attributes (scew_element const *element) |
Returns the list of all the element's attributes. More... | |
SCEW_API scew_attribute * | scew_element_attribute_by_name (scew_element const *element, XML_Char const *name) |
Returns the first attribute from the specified element that matches the given name. More... | |
SCEW_API scew_attribute * | scew_element_attribute_by_index (scew_element const *element, unsigned int index) |
Returns the attribute of the given element at the specified zero-based index. More... | |
SCEW_API scew_attribute * | scew_element_add_attribute (scew_element *element, scew_attribute *attribute) |
Adds an existent attribute to the given element. More... | |
SCEW_API scew_attribute * | scew_element_add_attribute_pair (scew_element *element, XML_Char const *name, XML_Char const *value) |
Creates and adds a new attribute to the given element. More... | |
SCEW_API void | scew_element_delete_attribute_all (scew_element *element) |
Deletes all the attributes of the given element. More... | |
SCEW_API void | scew_element_delete_attribute (scew_element *element, scew_attribute *attribute) |
Deletes the given attribute from the specified element. More... | |
SCEW_API void | scew_element_delete_attribute_by_name (scew_element *element, XML_Char const *name) |
Deletes the first attribute of the given element that matches name. More... | |
SCEW_API void | scew_element_delete_attribute_by_index (scew_element *element, unsigned int index) |
Deletes the attribute of the given element at the specified zero-based index. More... | |
SCEW element's handling routines.