using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
public partial class _Default : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
//Create a new xmlDataDocument
XmlDataDocument myDoc = new XmlDataDocument();
//The familie
XmlElement Familie = [Link]("Familie");
//The elements wrapper
XmlElement wrapper = [Link]("xml");
//Create attributes
XmlAttribute version = [Link]("version");
XmlAttribute encoding = [Link]("encoding");
//Add values to attributes
[Link] = "1.0";
[Link] = "utf-8";
//Append attributes to their correspondent element
[Link](version);
[Link](encoding);
//The Father
XmlElement Father = [Link]("Father");
//Create attributes
XmlAttribute FatherName = [Link]("Name");
XmlAttribute FatherAge = [Link]("Age");
//Add values to attributes
[Link] = "My father";
[Link] = "65";
//Append attributes to their correspondent element
[Link](FatherName);
[Link](FatherAge);
//Add the element to the Familie node
[Link](Father);
//The mother
XmlElement Mother = [Link]("Mother");
//Create attributes
XmlAttribute MotherName = [Link]("Name");
XmlAttribute MotherAge = [Link]("Age");
//Add values to attributes
[Link] = "My mother";
[Link] = "60";
//Append attributes to their correspondent element
[Link](MotherName);
[Link](MotherAge);
//Add the element to the Familie node
[Link](Mother);
//The sister
XmlElement Sister = [Link]("Sister");
//Create attributes
XmlAttribute SisterName = [Link]("Name");
XmlAttribute SisterAge = [Link]("Age");
//Add values to attributes
[Link] = "My sister";
[Link] = "20";
//Append attributes to their correspondent element
[Link](SisterName);
[Link](SisterAge);
//Add the element to the Familie node
[Link](Sister);
//The brother
XmlElement Brother = [Link]("Brother");
//Create attributes
XmlAttribute BrotherName = [Link]("Name");
XmlAttribute BrotherAge = [Link]("Age");
//Add values to attributes
[Link] = "My brother";
[Link] = "21";
//Append attributes to their correspondent element
[Link](BrotherName);
[Link](BrotherAge);
//Add the element to the Familie node
[Link](Brother);
//wrapp all elements nodes in wrapper node
[Link](Familie);
//Add the entire node in to the docuement
[Link](wrapper);
//Save the xml document
[Link](@"C:\[Link]");
//Give a signal that all gonna be all right
[Link]("Document is generated successfully!!");
[Link]();
}
}