6.4. Expressions

Expressions in XPath include the sorts of structures, operators, and data types found in most computer languages, albeit with a few differences. This section gives an overview of these distinguishing features. Consult the XPath Recommendation [XPath] for the full details. Note that location paths can appear in expressions, and expressions can appear in location paths as predicates (see Section 6.3.4).

Table 6-3. XPath Abbreviations
Abbreviation Description
Examples
// Equivalent to the location step
/descendant-or-self::node()/

Because this path is defined as ending with a slash, it cannot occur at the end of a location path. Because it is defined as starting with a slash, when it occurs at the beginning of a location path, that ...

Get Secure XML: The New Syntax for Signatures and Encryption now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.