In this case you cannot look at the individual descendants but you need to search the "parent" nodes individually, and then query their descendants.
Example: given the file
<br /><?xml version="1.0" encoding="utf-8" ?><br /><people><br /> <person><br /> <name>Franz</name><br /> <country>Canada</country><br /> </person><br /> <person><br /> <name>Franz</name><br /> <country>Germany</country><br /> </person><br /> <person><br /> <name>Bob</name><br /> <country>Canada</country><br /> </person><br /> <person><br /> <name>Mike</name><br /> <country>UK</country><br /> </person><br /> <person><br /> <name>Alan</name><br /> <country>Germany</country><br /> </person><br /></people>
First you build a list of the "person" node to get the 'container'. Then you can do a sub-query on each node, looking for the child elements.
<br /> var doc = XDocument.Load("XMLFile1.xml");<br /><br />
This produces the following:
<br />FRANZ or CANADA<br />---------------<br />Franz - Canada<br />Franz - Germany<br />Bob - Canada<br /><br />FRANZ and CANADA<br />----------------<br />Franz - Canada<br />