axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
typedef axl_bool(* axlIterationFunc2)(axlNode *node, axlNode *parent, axlDoc *doc, axl_bool *was_removed, axlPointer ptr, axlPointer ptr2)

Axl iteration function definition (with two user defined pointer support).

This handler definition is used by axl_doc_iterate_full as the function definition that will be called for each node found in the document.

The function provides a pointer to the node found, the first paramenter, and additionally, provides a pointer to the parent node for the node found, the document where the node is found and an optional user defined pointer provided at the function calling (axl_doc_iterate_full).

The function returns a axl_boolean value to signal the library to stop iterating over the XML structure if axl_false is returned. So, to continue the iteration, you must always return axl_true.

nodeThe node found inside the document.
parentThe parent node for the node found (first parameter).
docThe document that contains the node found.
was_removedIf contains a reference to a boolean value that helps the invoked funtion to notify the iteration system that the node was removed from the tree, using axl_node_remove or axl_node_replace. Iteration support inside axl library is built in a way that allows the programmer to remove a node (including its childs) without breaking the loop, however, you must use this variable to notify that the node was removed, so the iteration system won't iterate over its childs.
ptrA user defined pointer that the user provided at axl_doc_iterate_full.
ptr2Second user defined pointer that the user provided at axl_doc_iterate_full.
The callback must return axl_false in the case the iteration must be stopped. Otherwise, axl_true must be returned.