Sorry if I don't explain this clearly. I will try my best to clarify what I'm trying to do. Without further ado ... Suppose you have a series of numbers on a page (separated by a space), where the brackets indicate the current page you are on.
This looks like a page:
[1] 2 3
HTML looks like this:
<tr>
<td>
[<a href='link1.php'>1</a>] <a href='link2.php'>2</a> <a href='link3.php'>3</a>
</td>
</tr>
I'm just trying to select the next page number based on the current. I suppose I need to use some form of the next brother, but all I came up with is // tr / td / a / following -sibling :: a [1], which is clearly wrong. He chooses 2 if on page 1, but not 3 if on page 2, as expected. I would try to use [text () [contains (., '[')]] To select the current page, but the brackets are out of binding and not inside. Ik !?
It would be very helpful if you could explain the thinking process along with your decision, and not just insert the answer. Waiting for your help.
source
share