Originally posted by Paul Clapham:
You don't append data to an XML document. Doing that would cause it to be not well-formed. That's because an XML document must have a single root element.
So your requirement to "append data into" an existing XML document must mean that you are adding an element (or maybe more than one) as the last child of the root element. That's how you should write your code. And really, your requirements should have been specific and said that in the first place.
what i want is to overwrite data in XML file instead of overwriting entire xml file.