I have HTML code like this:
<code><li>
<span class="a">b</span>
lorem ipsum
</li>
</code>
<code><li>
<span class="a">b</span>
lorem ipsum
</li>
</code>
<li>
<span class="a">b</span>
lorem ipsum
</li>
I want to get the text lorem ipsum, related to the span element.
I tried //following::span[@class="a"]/text()
, in my opinion correct, as stated in other thread – but this didn’t work for me.