XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(@"C:\test.xml");
//Save the xml and then cleanup
XmlWriterSettings settings = new XmlWriterSettings { Indent = true };
XmlWriter writer = XmlWriter.Create(@"C:\test.xml", settings);
xmlDoc.Save(writer);