xpath_number
function
Applies to: Databricks SQL Databricks Runtime
Returns a DOUBLE value from an XML document.
Syntax
xpath_number(xml, xpath)
Arguments
xml
: A STRING expression of XML.xpath
: A STRING expression that is a well formed XPath.
Returns
A DOUBLE.
The result is zero if no match is found, or NaN
if a match is found but the value is non-numeric.
The function raises an error if xml
or xpath
are malformed.
Examples
> SELECT xpath_number('<a><b>1</b><b>2</b></a>', 'sum(a/b)');
3.0
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for