CommencerCommencer gratuitement

Find a more elegant XPATH alternative

Given the rather verbose CSS selector ul.list > li:nth-child(5), ul.list > li:last-child, ul.list > li.special, what's a possible XPATH alternative that selects exactly the same elements? Assume that ul.list has six li children in total.

Cet exercice fait partie du cours

Web Scraping in R

Afficher le cours

Exercice interactif pratique

Passez de la théorie à la pratique avec l’un de nos exercices interactifs

Commencer l’exercice