System.Xml.XmlDocument d = new System.Xml.XmlDocument(); d.Load(Server.MapPath("~/1.xml")); System.Xml.XmlCDataSection n = d.SelectSingleNode("/net_lover/sitename").FirstChild as System.Xml.XmlCDataSection; n.Value = "h1>.NET 开发/h1>"; d.Save(Server.MapPath("~/2.xml"));