分类:
.net
- public ActionResult Update()
- {
- string uri = Server.MapPath("~/xml/boos2.xml");
-
- var root = XElement.Load(uri);
-
-
- XElement book = root.Element("books").Elements("book").Where(a => a.Attribute("bno").Value == "b001").FirstOrDefault();
- book.ReplaceNodes(new XElement("sister", "嘿嘿"),
- new XElement("height", "180kg"));
-
- root.Save(uri);
-
- return View();
- }
欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739
评价