Title: how to Create XML                                 If you need copy same format use firefox or chrome or safari but iexplorer not work


Preview of Code
using (System.Xml.XmlWriter writer = System.Xml.XmlWriter.Create(Server.MapPath("~/employees.xml")))
            {
                writer.WriteStartDocument();
                writer.WriteStartElement("Employees");
                DataTable DT = new DataTable();
               
                for (int i = 0; i < DT.Rows.Count; i++)
                {
                   writer.WriteStartElement("Employee");
 
                   writer.WriteElementString("ID", DT.Rows[i]["ID"].ToString());
                   writer.WriteElementString("FirstName", DT.Rows[i]["Name"].ToString());
                   writer.WriteElementString("Surname", DT.Rows[i]["Surname"].ToString());
                   writer.WriteElementString("Mobile", DT.Rows[i]["Mobile"].ToString());
                    writer.WriteEndElement();
                }
 
                writer.WriteEndElement();
                writer.WriteEndDocument();
            }