|Look into serializing / de-serializing objects.
The basic idea is that you create a class which matches the structure of the XML file, then your program instantiates the object, fills in the properties and calls a "Save" method which writes the value of the object out in XML format.
Sounds much easier than it is, but once you get the hang of it, works well.
Lots of articles here on how to serialize objects.
Just a thought.