Hi All,
   Here I have given the sample code to create a simple XML from .NET.
Please post your comments after review this....

string strfile = Server.MapPath("~/App_Data/simplexmlcreation.xml");
XmlTextWriter writexml = new XmlTextWriter(strfile, System.Text.Encoding.UTF8);
try
{
// write the top element and encode type
writexml.WriteStartDocument();
// write the starting element or root element
writexml.WriteStartElement("IPL");
// write first set of records
writexml.WriteStartElement("team");
// write the attributes
writexml.WriteAttributeString("Name", "Chennai Super Kings");
writexml.WriteAttributeString("Points", "40");
writexml.WriteAttributeString("Captain", "Raina");
writexml.WriteString("CSK HAS MATHEW HAYDEN");
writexml.WriteEndElement();

//// write Second set of records
writexml.WriteStartElement("team");
// write the attributes
writexml.WriteAttributeString("Name", "Kolkatta Knight Riders");
writexml.WriteAttributeString("Points", "45");
writexml.WriteAttributeString("Captain", "Saurav");
writexml.WriteString("KKR HAS Saurav Ganguly");
writexml.WriteEndElement();

//// write Third set of records
writexml.WriteStartElement("team");
// write the attributes
writexml.WriteAttributeString("Name", "Royal Challangers Bangalore");
writexml.WriteAttributeString("Points", "55");
writexml.WriteAttributeString("Captain", "Kumble");
writexml.WriteString("KKR HAS Kalis");
writexml.WriteEndElement();

// Close the root Element
writexml.WriteEndElement();
//close the XML DOC
writexml.WriteEndDocument();
}

catch
{
throw;
}

finally
{
writexml.Close();
}



Thanks for reading my POST..... Keep Coding!!!!!!!