Go to the source code of this file.
Functions/Subroutines | |
int | ccpp_xml_load (const char *, void **, void **) |
int | ccpp_xml_unload (void **) |
int | ccpp_xml_ele_find (void **, const char *, void **) |
int | ccpp_xml_ele_next (void **, const char *, void **) |
int | ccpp_xml_ele_contents (void **, char **) |
int | ccpp_xml_ele_count (void **, const char *, int *) |
int | ccpp_xml_ele_att (void **, const char *, char **) |
Routines and functions for processing xml files.
int ccpp_xml_ele_att | ( | void ** | node, | |
const char * | name, | |||
char ** | value | |||
) |
Get the attribute at the node.
Get the attribute at the node.
[in] | node | The toplevel node pointer to start from. |
[in] | name | The name of the attribute to get. |
[out] | value | The value of the attribute. |
0 | If it was sucessful. | |
1 | If there was an error. |
< String length
< XML tree node
< The attribute value
int ccpp_xml_ele_contents | ( | void ** | node, | |
char ** | value | |||
) |
Get the contents of the node
Get the contents of a node.
[in] | node | The toplevel node pointer to start from. |
[out] | value | The value of the attribute. |
0 | If it was sucessful. | |
1 | If there was an error. |
< String length
< XML tree node
< The contents value
int ccpp_xml_ele_count | ( | void ** | node, | |
const char * | name, | |||
int * | n | |||
) |
Count the number of specifid elements within in a XML document/node
Count the number of elements within the XML node.
[in] | node | The toplevel node pointer to start from. |
[in] | name | The name element to count. |
[out] | n | The number of times the element was found. |
0 | If it was sucessful. | |
1 | If there was an error. |
< XML tree root node
int ccpp_xml_ele_find | ( | void ** | node, | |
const char * | name, | |||
void ** | ele | |||
) |
Find the first occurance of the specified element within in a XML document/node
Get the first occurance of the node.
[in] | node | The toplevel node pointer to start from. |
[in] | name | The name element to retrieve. |
[out] | ele | The first occurance of the element. |
0 | If it was sucessful. | |
1 | If there was an error. |
< XML tree root node
int ccpp_xml_ele_next | ( | void ** | node, | |
const char * | name, | |||
void ** | ele | |||
) |
Find the next occurance of the specified element within in a XML node
Get the next occurance of the node.
This uses xmlNextElementSibling() followed by a check of the name.
[in] | node | The toplevel node pointer to start from. |
[in] | name | The name element to retrieve. |
[out] | ele | The next occurance of the element. |
0 | If it was sucessful. | |
1 | If there was an error. |
< XML tree root node
int ccpp_xml_load | ( | const char * | filename, | |
void ** | xml, | |||
void ** | root | |||
) |
Load a XML file.
Read a xml file and load the information.
[in] | filename | The xml file name. |
[out] | xml | The xml document pointer. |
[out] | root | The root node of the xml document. |
0 | If it was sucessful. | |
1 | If there was an error. |
int ccpp_xml_unload | ( | void ** | xml | ) |
Unload the XML document and finish using the XML library
Unload the XML document and clean-up the XML parser.
[in] | xml | The xml document pointer. |
0 | If it was sucessful. | |
1 | If there was an error. |
< XML document tree