R
R
Roman Romanov2016-03-27 19:11:02
XPath
Roman Romanov, 2016-03-27 19:11:02

How to parse 1 and 3 node?

there is an xpath request descendant::tr[1 and 3]/td[1]
, it finds 3 nodes, but I need exactly the 1st and 3 nodes.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2016-03-27
@Roman_Romanov

Wouldn't it be better to use position()

descendant::tr[position() = 1 or position() = 3]/td[1]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question