XMLPI()

Scalar. Adds a processing instruction node to an XML element being constructed with XMLELEMENT().

Syntax

XMLPI( target [, value])
Parameters

target

The processing instruction.

value

The value.

Data Types

Return

target

value

none

String

String

Usage

Adds a processing instruction node to an XML element. The target must follow the rules of the XMLELEMENT name, and therefore must be quoted. This function can only be used as an argument to XMLELEMENT.

See Also

Example

The following example shows a simple XML processing instruction:

INSERT INTO OutStream
SELECT XMLELEMENT("billing",
   XMLPI("sort", 'ascending'),
   'some value',
   XMLELEMENT("done"))
FROM Orders;