Find the correct CSS equivalent
Some XPATH queries have a direct equivalent in CSS.
Since you already know quite some CSS selectors, it might help to always mentally translate a path notation into the analogous CSS selector.
In this example, three different classes of CSS selectors are provided. For example, the first class type.class
could be a CSS selector like div.section
that would select all div
elements with the section
class.
This exercise is part of the course
Web Scraping in R
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
