While you do not need to use the DOM API to handle the XML, it is recommened. Just going through and deleting the last line and appending what you think is right can result in poorly formed XML documents.
If you are having troubles understanding the DOM API please feel free to post your code and ask questions, there are plenty of us here to help.
The basic idea of working with DOM is to:
Get your Document
Load your XML into it
Manipulate/create the tree
Save the document
Adding / removing nodes is very easy and you can build a tree as deep as you need.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.