void axl_node_replace ( axlNode node,
axlNode new_node,
bool  dealloc 
)

Allows to replace a selected node, with the new reference inside its context (updating all references: next, previous and parent).

If the node replace is inserted in a document, the replace also works. In fact, this function is designed to replace a node already inserted in an xml document (axlDoc). If the node being replaced is the root one, this function will configured the new root node.

Previous axlNode will be unreference according to dealloc value. This function will replace the node provided by the second reference (no matter if the node is inside a document or not).

Parameters:
node The node to be replaced by the following reference.
new_node The node that will replace the previous value.
dealloc Signal if the previous node must be deallocated.