标签:
XmlDocument xmldoc = new XmlDocument(); string xmlPath = HttpContext.Server.MapPath("~/*****.xml"); xmldoc.Load(xmlPath); XmlElement root = xmldoc.DocumentElement; string node = root.SelectSingleNode("/images/image[@id=‘1‘]/url").InnerText;
<?xml version="1.0" encoding="utf-8" ?> <images> <image id="0"> <url>/images/0.png</url> </image> <image id="1"> <url>/images/1.png</url> </image> </images>
标签:
原文地址:http://www.cnblogs.com/Jerrycjc/p/5151721.html