Renamed parameter to replace method to better clarify that this acts on xml nodes, not nodes of the tree