I am trying to figure out how I can keep the XML format intact.
Ex)
I have an empty element that when I save the file to a new file it adds the element like so:
<typeOfBackup></typeOfBackup>
Instead I want it to save like:
<typeOfBackup/>
My code:
XmlDocument myXmlDocument = new XmlDocument();
myXmlDocument.Load(@"C:\t1.xml");
XmlNode node;
node = myXmlDocument.DocumentElement;
myXmlDocument.Save(@"C:\t2.xml");