write and read xml file.