I have a list of divs as follows
From the list of divs given below, I only want to extract certain data from divs between data-index=3
and data-index=10
.
Currently I am able to extract all the divs using XPATH. But I don't want that. I want to only target specific divs.
How do I do that? Thank you
Use this XPath for inclusive 3 and 10:
//div[div[@data-index]]/div[@data-index[. >= 3 and . <= 10]]
Or this XPath for exclusive 3 and 10:
//div[div[@data-index]]/div[@data-index[. > 3 and . < 10]]