Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Databricks SQL
Databricks Runtime
Returns an INTEGER value from an XML document.
Syntax
xpath_int(xml, xpath)
Arguments
xml: A STRING expression of XML.xpath: A STRING expression that is a well formed XPath.
Returns
An INTEGER.
The result is zero if no match is found, or a match is found but the value is non-numeric.
The function raises an error if xml or xpath are malformed.
Examples
> SELECT xpath_int('<a><b>1</b><b>2</b></a>', 'sum(a/b)');
3