I need to write an XPath expression to get the href attribute of the anchor tag in the html below, which appears immediately after the one marked as "current page" (in the example # notimportant / 2).
<dd>
<a href="#notimportant/1" class="current-page">1</a>
<a href="#notimportant/2">2</a>
<a href="#notimportant/3">3</a>
<a href="#notimportant/4">4</a>
<a href="#notimportant/last">last</a>
</dd>
I thought about starting with something like // a [@ class = 'current-page'] /../ next-sibling-of-first-node / @ href, but I'm stuck here ...
Can anyone help me with this? I googled around, but XPath is not my favorite skill (and no, I cannot use jQuery, this is not webapp).
Pablo source
share