XElement school = new XElement("school",
new XElement("SectionA",
new XElement("Student", "guna"),
new XElement("Student", "Anbu"),
new XElement("Student", "Chandru")));
XElement Student = new XElement("Student","Rajesh");
school.Save(@AppDomain.CurrentDomain.BaseDirectory + "Joiningelements.xml");
ここでは、school要素にSectionAの学生要素の子を追加します。