basic saving to xml implementation