XMLEXISTS()

Scalar. Determines whether or not the results of an XPATH expression exists in an XML element.

Syntax

XMLEXISTS( xpath [, PASSING value])
Parameters

xpath

The XPATH expression.

value

The XML value. Can be omitted when used with XMLTABLE.

Data Types

Return

xpath

value

Boolean

String

XML

Usage

Sybase CEP evaluates xpath and returns True if it locates the results in value, False if it does not, and Null if evaluating xpath results in Null or an error.

See Also

Example

The following example shows testing for PA as the state:

INSERT INTO OutStream
SELECT orderid, customername
FROM Order2
WHERE XMLEXISTS ('//state[.=''PA'']', PASSING orderval2);