I'm trying explore using the xpath function to get access to proper math
In particular, I'm trying to access functions and operators in the xpath Math namespace
So in a compose action, I've entered the below expression:
xpath(xml('<root><numbers>16</numbers></root>'),'math:sqrt(/root/numbers)')
and attempted to evaluate it in an empty flow.
It throws an error, namely "The XPath expression evaluates to a result of type 'Any' that is not supported. The expression must evaluate to a number, a string, a boolean, or a node set."
However, this is a different error than when I use improper syntax in the xpath function, which leads me to believe it is being evaluated, but the result is not parseable by power automate.
I've attempted to wrap the math:sqrt() in the string() expression to force the result to be returned as a string but get an error indicating my xpath expression is not formatted correctly.
How do I properly write this xpath expression to actually retrieve the math:sqrt result?
This particular result is not super valuable, but I ultimately want to be able to use more of the math:pow function to be able to return the result of fractional exponentiation, since there is no way to arrive at that or an approximation natively in power automate.
Note: I also attempted the below expression with the same outcome, where the result was of type "Any":
xpath(xml('<root><numbers>16</numbers></root>'),'math:sqrt(16)')