Introduction to XPath

XPath is a language used to find information in XML documents. XPath is used to navigate within XML documents through elements and attributes.

Knowledge you should have before learning:

Before you continue learning, you should have a basic understanding of the following knowledge:

  • HTML / XHTML
  • XML / XML namespace

If you wish to learn these projects first, please visit our Home page Access these tutorials.

What is XPath?

  • XPath uses path expressions to navigate within XML documents
  • XPath includes a standard function library
  • XPath is a major element in XSLT
  • XPath is a W3C Standard

XPath Path Expressions

XPath uses path expressions to select nodes or node sets in an XML document. These path expressions are very similar to the expressions we see in conventional computer file systems.

XPath Standard Functions

XPath contains more than 100 built-in functions. These functions are used for string values, numeric values, date and time comparisons, node and QName processing, sequence processing, logical values, and more.

XPath in XSLT

XPath is a major element in the XSLT standard. Without knowledge of XPath, you cannot create an XSLT document.

You can read more about XQuery in ourXSLT TutorialRead more content in

XQuery and XPointer are both built on top of XPath expressions. XQuery 1.0 and XPath 2.0 share the same data model and support the same functions and operators.

You can read more about XQuery in ourXQuery TutorialRead more about XQuery knowledge in

XPath is a W3C Standard

XPath became a W3C standard on November 16, 1999.

XPath is designed to be used by XSLT, XPointer, and other XML parsing software.

You can read more about XQuery in ourW3C TutorialsRead more about XPath standards in