complete the fuction of operating the xml file