I want to query the following xml file using LINQ To XML
<table>
<row>
<cell>
<content>x</content>
<cell>
<cell>
<content>y</content>
<cell>
<cell>
<foo>
<bar>x</bar>
</foo>
<cell>
<row>
</table>
Im trying to get all cell nodes that have a descendant with the value ‘x’. In this example two cell nodes should be returned
You can use the
Anyextension method to see if any of the descendents of cell have the correct value.