How to read XPathNodelist

Programming in C# I got an Xml.XpathNodeList object "ResultsPartRel.nodeList". Debugging it with Visual Studio I can read "Results View ; Expanding the Results View will enumerate the IEnumerable"Questions:1.- Which is the best way to read those nodes?2.- I program the next code but I dont get the expected results. I get the same result twice. (ResultsPartRel.nodeList contains 2 nodes)\[code\] List<string> childrenName = new List<string>(); foreach (XmlElement node in ResultsPartRel.nodeList) { string nameChildren = node.SelectSingleNode("//related_id/Item/keyed_name").InnerText; childrenName.Add(nameChildren); }\[/code\]Thank you in advance.EDIT\[code\]<related_id> <Item> <classification>Component</classification> <id></id> <keyed_name>glass</keyed_name> <!-- I want to get this InnerText --> </Item></related_id><source_id>968C45A47942454DA9B34245A9F72A8C</source_id><itemtype>5E9C5A12CC58413A8670CF4003C57848</itemtype>\[/code\]
 
Back
Top