XPath
This function uses XPath to read data from given XML string. If XPath return multiple nodes, value from first node will be returned.
Syntax
XPath("xml","xpath");
Function arguments
- xml – (String) XML with data
- xpath – (String) XPath
Return value
This function returns String.
Returns result of given xpath expression.
Examples
Example 1:
returns inner text from first number tag inside first invoice tag from xml stored in XML field
XPath([XML], "/invoice/number");
Example 2:
returns value of number attribute form first invoice tag from xml stored in XML field
XPath([XML], "/invoice/@number");
Example 3:
returns inner text from price tag form invoice tag with number attribute equal 1 from xml stored in XML field
XPath([XML], "/invoice[@number='1']/price");