XPath

XPath is a query language for selecting nodes from an XML or HTML document tree.

Web scraping tools use XPath expressions to target specific elements in the DOM — for example, `//div[@class="price"]` selects all div elements with class "price". XPath is an alternative to CSS selectors.

Related Terms