XPath Operators
XPath supports a number of operators that make your expressions more powerful. We’ll look at each of them here.
[1.0] The first two sections here cover all
of the XPath 1.0 operators except the vertical bar (|), the union operator. Only the vertical bar
is supported in XPath 1.0; the new union keyword is supported only in XPath 2.0.
See the section [2.0] Set Operators—except, intersect, and union” later in this chapter
for the details of the union operator (|) and the union keyword.
[2.0] In XPath 2.0, some operators work with
dates, times, and durations. For example, you can add 12 hours to an
xs:dayTimeDuration if you want. We
cover the operators and features specific to XPath 2.0 after looking at
the features common to XPath 1.0 and 2.0.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access