src/ccpp_xml.h File Reference

This graph shows which files directly or indirectly include this file:

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 **)

Detailed Description

Routines and functions for processing xml files.


Function Documentation

int ccpp_xml_ele_att ( void **  node,
const char *  name,
char **  value 
)

Get the attribute at the node.

Get the attribute at the node.

Parameters:
[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.
Return values:
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.

Parameters:
[in] node The toplevel node pointer to start from.
[out] value The value of the attribute.
Return values:
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.

Parameters:
[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.
Return values:
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.

Parameters:
[in] node The toplevel node pointer to start from.
[in] name The name element to retrieve.
[out] ele The first occurance of the element.
Return values:
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.

Parameters:
[in] node The toplevel node pointer to start from.
[in] name The name element to retrieve.
[out] ele The next occurance of the element.
Return values:
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.

Parameters:
[in] filename The xml file name.
[out] xml The xml document pointer.
[out] root The root node of the xml document.
Return values:
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.

Parameters:
[in] xml The xml document pointer.
Return values:
0 If it was sucessful.
1 If there was an error.

< XML document tree

 All Classes Namespaces Files Functions Variables Defines

Generated on 26 Apr 2017 for ccpp by  doxygen 1.6.1