Added function that saves position of nodes to XML file