日期:2014-05-17 浏览次数:20473 次
string xmlFileName = Server.MapPath("~/test.xml");
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlFileName);
XmlNode node = xmlDoc.SelectSingleNode(@"//set[@label='赵六']");
node.Attributes["value"].Value = "100";
xmlDoc.Save(xmlFileName);