XmlDocument doc = new XmlDocument();
doc.Load(Server.MapPath("Book.xml"));
// 获取根节点
XmlElement Sections= doc.DocumentElement;
XmlElement Section = doc.CreateElement("Section ");
Section .InnerText = this.txtbookname.Text.Trim();
Section .SetAttribute("Index", this.txtbookname.Text.Trim());//添加属性
Sections.AppendChild(Section );