I have this simple DOM :
<r>
<a1>
<foo>...</foo>
<foo>...</foo>
<foo>...</foo>
</a1>
<a2>
<faa>...</faa>
<faa>...</faa>
<foo>...</foo>
</a2>
<a3>
<fii>...</fii>
<fii>...</fii>
<fii>...</fii>
</a3>
</r>
Is it possible with only XPath to select the element aX (here in the example, the element a1) containing only foo children elements?