<group> <items> <item /> <item /> </items> </group> <somethingelse> <items> <item /> <item /> </items> </somethingelse>I have loaded the XML doc and created an XmlNodeList like:
XmlNodeList groupNodeList = xml.SelectNodes(//group);If I then iterate through the groups and attempt to move through the items in that group, I am picking up all items, not just the ones in that group.
foreach (XmlElement groupNode in groupNodeList) XmlNodeList = groupNode.SelectNodes(//item);it works if I do this
XmlNodeList = groupNode.SelectNodes(//group//items//item);
obviously the groupNode is not what I think it is - what am I doing wrong here?