XPath (XML Path Language) is a query language for addressing nodes in an XML document with path expressions. It was standardized by the W3C, with version 1.0 becoming a recommendation in 1999. It treats a document as a tree and selects nodes by writing paths to elements, attributes, or text, such as '/html/body/div[2]/a'.
In web development and automation, XPath is widely used alongside CSS selectors to locate specific elements in the DOM of HTML documents. It is used to target elements in browser automation tools, test automation, and web scraping, though path expressions tend to break when page structure changes. It also underlies XML processing technologies such as XSLT and XQuery.