Finds elements or attributes by the specified Location Path interpreted against the specified context element and returns an array containing all values of the found elements or attributes.
Parameters:
element
The context element against which the Location Path is interpreted.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.getValuesByLPath(lpath)
See Also:
GOMContext.contextElement
lpath
The Location Path expression specifying how the elements or attributes should be searched.Use the Location Path Builder (found at the left panel's tree) to quickly construct a Location Path needed for this parameter.
Returns:
The array containing values of all elements/attributes found by the specified location path.If no data items found or the specified context element is
null
, the function returns an empty array.
Tip:
You may call this function in a method-like style, e.g.:
element.getValuesByLPath(lpath)
See Also:
getValueByLPath(), checkValueByLPath(), findElementsByLPath(),
findChildren(), getAttrValues(),
GOMElement.values
Examples:
This call will return all values ofgetValuesByLPath("link/@boss|link/@workers")
'boss'
and 'workers'
attributes
contained in all 'link'
children of the generator's current context element.
${include ../../../refs/lpaths.htm}