I have an xml file as follows:
Take the XML parser of your choice, parse the file, manipulate the file using the related API, write it back.