XMLDELETE()

Scalar. Deletes element trees from an XML value.

Syntax

XMLDELETE( value, xpath )
Parameters

value

The XML to modify.

xpath

An XPATH string specifying what to delete from value.

Data Types

Return

value

xpath

XML

XML

String

Usage

Sybase CEP Engine uses XPATH to locate the element trees specified by xpath in value. Sybase CEP Engine logs a warning for any non-element nodes it finds in value, but otherwise ignores them. It deletes each element tree it finds matching xpath, in document order. If both a tree and an ancestor of the tree match, Sybase CEP Engine only deletes the ancestor.

See Also

Example

The following example shows removing the shipping METHOD nodes from the value in the orderVal column:

INSERT INTO OutStream
SELECT XMLDELETE (O.orderVal, '//METHOD')
FROM O;