Question: ```
<a id ="1">
...<c>
......<b/>
......<f/>
......<b/>
......<f/>
...</c>
</a>
<a id="2">
...<c>
......<b/>
......<f/>
......<f/>
...</c>
</a>

```

If any elem b is followed by two or more f elements in order, return node a. I prefer straight XPath 2.0 solution, if possible. What xpath will get me a2 but not a1? I have tried following siblings, position, and such, to no avail.

Answer: 
With XPath 1.0:

```
a[.//b[following-sibling::*[1]/self::f and following-sibling::*[2]/self::f]]

```
you can get a2 using this :

```
       //a[@id=2]

```

just by using the id attribute.