C
C
CityzenUNDEAD2020-10-22 16:17:08
htaccess
CityzenUNDEAD, 2020-10-22 16:17:08

Is it possible to select only even elements of the sample by xpath?

Hello everyone!
Interests, it is possible to allocate only even elements from selection by xpath expression.
For example, I have this markup

<a class="index"></a>
<a class="index"></a>
<a class="index"></a>
<a class="index"></a>

Is it possible, how do you select all links through one, that is, 2nd, 4th, etc.?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2016-04-07
@shambler81

with localhost, I think you have a problem because of https, do you have https on your localhost?
As for the url, the base works on
RewriteCond %{REQUEST_URI}.

D
DevMan, 2020-10-22
@CityzenUNDEAD

//a[position() mod 2 = 0]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question