Fonction xpath_string

S’applique à :case marquée oui Databricks SQL case marquée oui Databricks Runtime

Retourne le contenu du premier nœud XML correspondant à l’expression XPath.

Syntaxe

xpath_string(xml, xpath)

Arguments

  • xml : expression de type STRING de XML.
  • xpath : expression de type STRING qui est un XPath bien formé.

Retours

Le résultat est une valeur STRING.

La fonction génère une erreur si xml ou xpath sont malformés.

Exemples

> SELECT xpath_string('<a><b>b</b><c>cc</c></a>','a/c');
 cc