Select node where value is web



I was given a web service that I have to use to pull data into a table. Right now it pulls all nodes, but I would like to pull only the nodes with Web.


Searching the web, I can only find examples of how to do this if there is an attribute, which there is not. This is what I have so far, and can't seem to figure out what to do next -



XmlNodeList records = root.SelectNodes("descendant::record[//@Origin=Web]");


Also tried -



XmlNodeList records = xmldoc.SelectNodes("/Results/Record/Origin['=Web']");

No comments:

Post a Comment