Axl iteration function definition.
This handler definition is used by axl_doc_iterate 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).
The function returns a boolean value to signal the library to stop iterating over the XML structure if false is returned. So, to continue the iteration, you must always return true.
- Parameters:
-
| node | The node found inside the document. |
| parent | The parent node for the node found (first parameter). |
| doc | The document that contains the node found. |
| was_removed | If 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. |
| ptr | A user defined pointer that the user provided at axl_doc_iterate. |
- Returns:
- The callback must return false in the case the iteration must be stopped. Otherwise, true must be returned.