axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
axlList * axl_node_get_childs ( axlNode node)

Allows to get childs nodes from the given xml node (axlNode).

This function creates a newly allocated list. In the case you want to iterate over all nodes, it is better to use something similar to this:

1 axlNode * child;
2 
3 // get the first child
4 child = axl_node_get_first_child (parent);
5 
6 // iterate over all nodes
7 while (child != NULL) {
8 
9  // do something with the child
10  do_some_work (child);
11 
12  // update the reference to the next child
13  child = axl_node_get_next (child);
14 }
Parameters
nodeThe node where the childs will be returned.
Returns
An axlList containing axlNode items or NULL if it fails. The list returned MUST be deallocated.

References axl_item_get_type(), axl_list_add(), axl_list_new(), axl_return_val_if_fail, and ITEM_NODE.