Example 2: Search nodes by XPath
MAIN
DEFINE nl om.NodeList
DEFINE r, n om.DomNode
DEFINE i INTEGER
LET r = ui.Interface.getRootNode()
LET nl = r.selectByPath("//Window[@name=\"screen\"]")
FOR i=1 to nl.getLength()
LET n = nl.item(i)
DISPLAY n.getAttribute("name")
END FOR
END MAIN