原文发布时间为:2009-08-26 —— 来源于本人的百度文章 [由搬家工具导入]

<?xml version="1.0" encoding="gb2312" ?>
<root>
<name >sdf<name>

</root>

string url = Server.MapPath("../XML/zone.xml");
        System.Xml.XmlDocument xdoc = new System.Xml.XmlDocument();
        xdoc.Load(url);
        System.Xml.XmlNodeList nodeList = xdoc.SelectNodes("root/name");
        foreach (System.Xml.XmlNode node in nodeList)
        {
            string strID = node.Attributes["id"].InnerText;
            if (strID=="1")
            {
                Response.Write(node.InnerXml);
            }

        }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2021-10-26
相关资源
相似解决方案