PHP Code:
//Save the data to a XML file
System.Xml.XmlDocument xdoc=new XmlDocument();
xdoc.LoadXml("<Profile/>");
System.Xml.XmlAttribute xatt;
//=================================
xatt=xdoc.CreateAttribute("FirstName");
xatt.Value="xtrung";
xdoc.DocumentElement.Attributes.Append(xatt);
//=================================
xatt=xdoc.CreateAttribute("LastName");
xatt.Value="Chealse";
xdoc.DocumentElement.Attributes.Append(xatt);
//=================================
xatt=xdoc.CreateAttribute("NamSinh");
xatt.Value="Vo Dich";
xdoc.DocumentElement.Attributes.Append(xatt);
//=================================
xdoc.Save("trung.xml");