Explain how to write data to an XML file.
XmlTextWriter writer = new XmlTextWriter(@"c:\abc.xml", null);
//Write the root element
writer.WriteStartElement("root");
//Write sub-elements
writer.WriteElementString("one", "node1");
writer.WriteElementString("two", "node2");
// end the root element
writer.WriteEndElement();
//Write the XML to file and close the writer
writer.Close();