XPATH()

Scalar. Returns the value in the string representation of an XML element matching an XPATH expression.

Syntax

XPATH( value, xpath )
Parameters

value

The value to search.

xpath

The XPATH string. The value of the element in value matching this string is extracted.

Data Types

Return

value

xpath

String

String

String

Example

The following example uses the XPATH function to return the first item element in the transaction element contained in the STRING column identified by Orders.lineitems:

INSERT INTO OutStream
SELECT XPATH(Orders.lineitems, "//transaction/item[1]")
FROM Orders;