Writing to xml file working, but with the problem of removing everything else that was previous in the xml file to insert the new data.