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");
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.