If we can get a collection of x nodes via XPath in ASP.NET 2.0? Then doing checking per the attrs of开发者_Python百科 them.
<x-list>
  <x id="1" enable="On" url="http://abc.123.dev"/>
  <x id="2" enable="Off" url="http://asd.com"/>
  <x id="3" enable="On" url="http://plm.xcv.tw"/>
</x-list>
Thanks for any help. Ricky
Here's a sample that'll retrieve all of your 'x' nodes that are enabled:
XmlNodeList nodes = root.SelectNodes("/x-list/x[@enable='On']");
foreach (XmlNode node in nodes)
{
  ...
}
I find w3schools a good place to look for XPath tutorials.
XmlDocument xDocument = new XmlDocument();
xDocument.LoadXml(xmlString);
XmlNodeList xList = xDocument.SelectNodes("x-list/x");
if (xList.Count > 0)
{
 foreach (XmlNode x in xList)
     {
         string id = x.Attributes["id"].Value;
  string enable = x.Attributes["enable"].Value;
  string url = x.Attributes["url"].Value;
  if (enable.Equals("On")
  {
   ...
  }
  else
  {
   ...
  }
 }
}
else
{
...
}
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论