XPath Introduction
XPath is a language for finding information in XML documents.
What you should know before learning:
Before you continue, you should have a basic understanding of the following:
- HTML / XHTML
- XML / XML Namespaces
If you wish to learn these topics first, please visit our Home to access these tutorials.
What is XPath?
|
|
- XPath uses path expressions to navigate in 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 closely resemble the ones we see in a regular computer file system.
XPath standard functions
XPath has more than 100 built-in functions. These are used for string values, numeric values, date and time comparisons, node and QName handling, sequence processing, boolean values and more.
XPath used in XSLT
XPath is a major element in the XSLT standard. Without knowledge of XPath you cannot create XSLT documents.
You can find it in our XSLT Tutorialfor more content.
XQuery and XPointer are both built on XPath expressions. XQuery 1.0 and XPath 2.0 share the same data model and support the same functions and operators.
You can find it in ourXQuery Tutorialfor more about XQuery.
XPath is a W3C standard
XPath became a W3C standard on 16 November 1999.
XPath was designed for use by XSLT, XPointer and other XML parsing software.
You can read more about XML standards in ourW3C Tutorialfor more information about the XPath standard.