XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(Server.MapPath("*.xml"));XmlNode newElem=xmldoc.CreateElement("user");XmlNode subElem=xmldoc.CreateElement("uid");
subElem.InnerText="user3";
newElem.AppendChild(subElem);subElem=xmldoc.CreateElement("pwd");
subElem.InnerText=789;
newElem.AppendChild(subElem);xmldoc.DocumentElement.AppendChild(newElem);
xmldoc.Save(Server.MapPath("*.xml"));
xmldoc.Load(Server.MapPath("*.xml"));XmlNode newElem=xmldoc.CreateElement("user");XmlNode subElem=xmldoc.CreateElement("uid");
subElem.InnerText="user3";
newElem.AppendChild(subElem);subElem=xmldoc.CreateElement("pwd");
subElem.InnerText=789;
newElem.AppendChild(subElem);xmldoc.DocumentElement.AppendChild(newElem);
xmldoc.Save(Server.MapPath("*.xml"));
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货