XPath()

The XPath() function returns xpath evaluation on current AUI tree context.

The result can only be a string not a node.

Syntax

xpath(expr)
Note:
  1. Return evaluation of xpath string(expr) result on current AUI tree context.

Example

This gives the name of the first window:
<span gwc:content="xpath('//Window[1]/@name')" />
This gives the list of windows:
<div gwc:repeat="i for(1,application/ui/windows/length)"
  gwc:omit-tag="true">
  <span gwc:condition="xpath('//Window[' + i + ']/Form/@name')"
   gwc:content="' 
   :: ' + ( xpath('//Window[' + i + ']/Form/@text') ||
     xpath('//Window[' + i + ']/@text')
   || xpath('//Window[' + i + ']/Form/@name') ) " />
  <span gwc:condition="!xpath('//Window[' + i + ']/Form/@name')"
   gwc:content="'::
   ' + xpath('//Window[' + i + ']/@name')" />
</div>