XML Functions (LR_XML) > Alphabetical List of Functions > lr_xml_find


Example: lr_xml_find XML Functions (LR_XML)

Verifies that XML values are returned by a query.

int lr_xml_find( <List of specifications> [, <List of optional specifications> ] [, LAST]);
List of specifications

For the following list of required specifications, use the following string format:"Specification=value"
Query: the XML Query or Fast Query on the input string XML.
XML: the XML Input String to query

Choose one of the following:
Value: the string to find. This can be the element value or its attribute value.
ValueParam: the parameter name containing the string to find.

List of optional specifications

For the following list of optional specifications, use the following string format:"Specification=value"

SelectAll: If "yes", all elements matching the query will be processed. If "no", only the first query match will be verified. Default is "no". See Multiple Query Matching
IgnoreCase: If "yes", the search will ignore the difference between uppercase and lowercase characters of Value or ValueParam and query results. Default is "no".
UseRegExp: If "yes", Value and ValueParam can be regular expressions that the function will search for. For more information, see Regular Expressions. The default is "UseRegExp=no".
NotFound: Specifies whether the script fails or continues if the search value is not found. Value is "continue" or "error". If NotFound is not specified, the script fails.

LAST A marker which indicates the end of the List of optional specifications

The lr_xml_find function queries the XML input string XML for values matching the Query criteria (Value or ValueParam) and returns the number of occurrences. If SelectAll is "no", lr_xml_find returns either 1 or 0.

Return Values

See Return Values


See Parameterization