I have the following example of HTML:
Foo bar
lorem
ipsum
etc
This XPATH 1.0 statement selects all of the that are siblings that follow an
who's string value is equal to "Foo bar", that are also followed by an
sibling element who's first preceding sibling
has a string value of "Foo bar".
//p[preceding-sibling::h2[.='Foo bar']]
[following-sibling::h2[
preceding-sibling::h2[1][.='Foo bar']]]