This function searches for elements/attributes by the specified Location Path
interpreted against the specified context element. As soon as any element/attribute with
a non-null value is found, that value is returned as the function result.
If no data items can be found by the specified location path, the function returns null.
Effectively, this function returns the same result as one of the following calls (however, it will work faster):
getValuesByLPath(element, lpath).elementAt(0)getValuesByLPath(lpath).elementAt(0)
findChild("SourcePosition").getAttrValue("fileDir")
getValueByLPath("SourcePosition/@fileDir")
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.getValueByLPath(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.
getValuesByLPath(), hasValuesByLPath(), findChild(), getAttrValue(), GOMElement.value