W3C

XML Path Language (XPath) 4.0 WG Review Draft

W3C Editor's Draft 14 December 2022

This version:
https://qt4cg.org/specifications/xpath-40/
Most recent version of XPath:
https://qt4cg.org/specifications/xpath-40/
Most recent Recommendation of XPath:
https://www.w3.org/TR/2017/REC-xpath-31-20170321/
Editor:
Michael Kay, Saxonica <mike@saxonica.com>

Please check the errata for any errors or issues reported since publication.

See also translations.


Abstract

XPath 4.0 is an expression language that allows the processing of values conforming to the data model defined in [XQuery and XPath Data Model (XDM) 3.1]. The name of the language derives from its most distinctive feature, the path expression, which provides a means of hierarchic addressing of the nodes in an XML tree. As well as modeling the tree structure of XML, the data model also includes atomic values, function items, and sequences. This version of XPath supports JSON as well as XML, adding maps and arrays to the data model and supporting them with new expressions in the language and new functions in [XQuery and XPath Functions and Operators 4.0]. These are the most important new features in XPath 4.0:

  1. 4.14.1 Maps.

  2. 4.14.2 Arrays.

XPath 4.0 is a superset of [XML Path Language (XPath) Version 3.0]. A detailed list of changes made since XPath 3.0 can be found in I Change Log.

Status of this Document

This is a first proposal by the editor, with no official standing whatsoever. Comments are invited.