string tempPath = this.Request.PhysicalApplicationPath + "web.config";
XmlDocument xd = new XmlDocument();
xd.Load(tempPath);
XmlNode xn = xd.SelectSingleNode("http://add[@key='test']");//獲取節點屬性
XmlNode xn = xd.SelectSingleNode("/configration/appSetting/add[@key='test']");
Response.Write(xn.Attributes["value"].Value);
posted on 2010-03-28 22:33
sanmao 閱讀(1246)
評論(1) 編輯 收藏