AbsoluteLocationPath

Select nodes on an absolute location path.


Syntax

AbsoluteLocationPath

/ RelativeLocationPath ? |  AbbrevAbsoluteLocPath

Description

An AbsoluteLocationPath selects nodes on the absolute location path starting at the document root. It consists of "/" optionally followed by a relative location path. The operator "/" by itself selects the root node of the document. If it is followed by a relative location path, then the location path selects the set of nodes that would be selected by the relative location path relative to the root node of the document. Alternatively you can use an abbreviated absolute location path.

Compatibility

It corresponds to the expression AbsoluteLocationPath defined in XPath, Section 2, Rule 2.

Examples

  • Select all patients (the child element node of the root node, which is also the doctype element):

    /patient
  • Select all types of medication used (all type nodes that are descendants of a therapy node of the context node patient):

    /patient/therapy//type
  • Select all patients whose names start with "B" (all patient nodes that satisfy the following predicate expression: surname child nodes of the name nodes that contain words beginning with "B" or "b"):

    /patient[./name/surname ~= 'B*']

Related Expression

RelativeLocationPath