Change XML file writing to preerve thigns like tags etc