Chapter 8. XPath 2.0 Expressions and Operators

Creating Primary Expressions

The most basic expression type is the primary expression type. This type can be one of these:

  • A literal

  • A variable

  • A function call

  • A context item

  • A parenthesized expression, which is used to control precedence of operators

  • A comment

To understand these in detail, we'll take a look at them one by one.

Literals

A literal is just a value that is of an atomic type. As ...

Get XPath: Navigating XML with XPath 1.0 and 2.0 Kick Start now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.