Conversion from `XPathNodeIterator` to `linq`

grierserbinar

New Member
I am updating some old code of mine and decided to change everything XML related from XPath to Linq (So learn linq meanwhile). I came across this code, Can someone please tell me how to translate this to a linq statement?\[code\]var groups = new List<string>();XPathNodeIterator it = nav.Select("/Document//Tests/Test[Type='Failure']/Groups/Group/Name");foreach (XPathNavigator group in it){ groups.Add(group.Value);}\[/code\]
 
Back
Top