axlNode * axl_node_get_first_child ( axlNode node  ) 

Allows to get the first child that holds the node.

This function is considered inside the CHILDREN API, which is the set of functions that are used to handle XML documents that have node that contains more nodes or content, but not mixed.

This function allows to get the first child found that is an axlNode. In the case your application is handling a document that don't mix nodes and content at the same level inside another xml nodes, you'll get the expected results.

But, calling to this function on a node that contains content mixed with another nodes, you will skip all items stored before the first xml node found as child.

Let's see some examples to clarify this. Provided the following xml document:

 <document>
   <child>
     Content
   </child>
 </document>

If you want to get a reference to the child node you can do the following:

 // supposing the document is already loaded in "doc"
 axlNode * node = axl_doc_get_root (doc);

 // get the first child 
 node = axl_node_get_first_child (node);

 // now you have in "node" a reference to the child node.

However, in the case the previous content mix node with content as follows:

 <document>
   Some content previous to the first child.
   <child>
     Content
   </child>
 </document>

Using this function will make you to skip the first content, that is, "Some content previous to the first child", which is found before the <child> node. In the case you want to have full access to all items stored as child for a particular node, check axl_item_get_first_child.

Parameters:
node The node that is requested to return its first child.
Returns:
The first child node or NULL if it has no child node.