There are classes for reading XML:
XmlDocument slow and memory intensive: it parses the XML and loads it into the DOM in RAM, which is good if you want to edit it.XmlReader consumes less memory: it scans XML from front to back, and it does not need to permanently store everything in RAM.
Similarly, for recording, you can build XmlDocumentand then save it or use it XmlWriter.
After I wrote above, now there is a new set of APIs that are easier to use: for example, XDocumentand classes XElement.