Finds elements by the specified Location Path interpreted against the specified context element and returns an enumeration of the found elements.
Parameters:
element
If this parameter is not specified, the Location Path will be interpreted
against the generator context element, which is the same as the call:
contextElement.findElementsByLPath(lpath)
See Also: GOMContext.contextElement
lpath
Use the Location Path Builder (found at the left panel's tree) to quickly construct a Location Path needed for this parameter.
filterQuery
When specified, this should be a boolean subquery created with BooleanQuery()
function.
The subquery will be processed against each initially selected element and should return true
if the element must be counted and false
otherwise.
The tested element is passed to the subquery as the generator context element.
Note: The null
value in this parameter will mean that no filtering condition is specified.
filterKeyQuery
filterQuery
parameter (above).
When specified, this should be a subquery created with FlexQuery()
function.
The subquery will be executed for each tested element (initially passed the filterQuery
condition)
to generate a certain key associated with that element.
The elements whose keys are repeating will be excluded from the result enumeration.
The tested element is passed to the subquery as the generator context element.
The value returned by the subquery should be an object good to be a hash key.
The null
value is also allowed.
Notes:
null
value in this parameter will be treated as no filtering by keys specified.
HashKey()
function.
filterQuery
and filterKeyQuery
are specified,
the filtering by key will be applied after the filtering by condition.
That's important because those operations may be not commutative.
countElementsByLPath(), findElementsByLRules(), HashKey()
element.findElementsByLPath(lpath)
findElementByLPath(), countElementsByLPath(), checkElementsByLPath(),
getValuesByLPath(), findElementsByLRules(), findChildren()
The following expression counts those children of the generator's current context element, which are instances of 'Class' Element Type:
count (findElementsByLPath ("Class"))
findElementsByLPath(rootElement, "classes^::ClassDoc [getAttrBooleanValue('isInterface')]")
true