Save graph to xml file