axlAttrCursor * axl_node_attr_cursor_new ( axlNode node  ) 

Allows to get a cursor to iterate attributes found in the provided node in a linear and efficient way.

The axlAttrCursor could be used to iterate attributes inside a particular node in an efficient way because it stores current state (position), hiding all module details, providing access to attributes without knowing them. Then using the following functions you can modify the state (current position to get):

Finally, the following functions are provided to get the the key and the value data associated to the current selected attribute, pointed by the current status of the cursor:

Here is an example:

 axlPointer           key;
 axlPointer           value;
 axlAttrCursor * cursor;
 
 // create the cursor 
 cursor   = axl_node_attr_cursor_new (node);

 // while there are more elements 
 while (axl_node_attr_cursor_has_item (cursor)) {

   // get the value and key
   key   = axl_node_attr_cursor_get_key   (cursor);
   value = axl_node_attr_cursor_get_value (cursor);

   // get the next 
   axl_node_attr_cursor_next (cursor);

 } 

 // free the cursor 
 axl_node_attr_cursor_free (cursor);

Once created the axlAttrCursor you must release it and create a new one if you modify your axlNode attribute configuration adding more items.

Parameters:
node The node that is requested to create the axlAttrCursor reference to iterate all attributes inside.
Returns:
A newly created axlAttrCursor used to iterate attributes inside the node provided. Once finished you must call to axl_node_attr_cursor_free.