Somehow, you'll have to read the XML file, since you cannot just add a node to the document.
An Xml file can have only one root, so the new node will have to be added after the last data element, but, before the root closing tag. Otherwise the xml is not valid.