om.DomNode.selectByPath

Finds descendant DOM nodes according to an XPath-like pattern.

Syntax

selectByPath(
   xpath STRING )
  RETURNING result om.NodeList
  1. xpath is an XPath-like pattern, using .

Usage

The selectByPath() method scans the DOM tree for descendant nodes according to the specified XPath-like pattern.

The pattern supported is limited to the following syntax:

{ / | // } TagName [ [@AttributeName="Value"] ] [...]

DOM node tag names and attributes names are case-sensitive.

The method creates a list of nodes as a om.NodeList object. This list object is then used to process the nodes found.

Example

DEFINE node om.DomNode,
       nodelist om.NodeList
...
LET nodelist = node.selectByPath("//Grid/Table[@tabName=\"t1\"]")