Skip to main content

XPath Tutorial

The XML Path (XPath) language is a query language for XML documents, developed by the W3 consortium.

XPath provides users with a non-XML-based syntax that allows them to point to elements in an XML document.

XPath is mainly used in XSLT, but can also be used as a much more powerful way of navigating through the DOM of any XML-like language document such as HTML and SVG.

Normally, XPath is embedded in a host language, which allows processing of the addressed XML elements. XQuery, for example, is used to query XML elements addressed by XPath. XSLT uses the query language to transform XML documents.

  • XPath: navigating XML documents.
  • XQuery: queries on XML documents.
  • XSLT: transformation of XML documents.