Syntax
XMLVALUE(<XPath>;<string [containing XML elements]>)
Description
Returns a value selected by the given XPath expression out of an XML document.
If the XPath entered selects more than one value, the result is always the first value found. When searching for multiple values from an XML document, use the function XMLVALUES.
Example
XMLVALUE("/issues/issue/id/text()";#Column_with_XML)
Column with XML | XMLVALUE returns |
---|---|
<issues> <issue> <id>1</id> <name>Fix problem 1</name> </issue> <issue> <id>2</id> <name>Fix problem 2</name> </issue> </issues> | 1 |
<issues> <issue> <id>3</id> <name>Fix problem 3</name> </issue> <issue> <id>4</id> <name>Fix problem 4</name> </issue> <issue> <id>5</id> <name>Fix problem 5</name> </issue> </issues> | 3 |
<issues> <issue> <id>6</id> <name>Fix problem 6</name> </issue> <issue> <id>7</id> <name>Fix problem 7</name> </issue> </issues> | 6 |