IBM Streams 4.2.1

C++ Native Functions: spl.XML

This page documents native functions that can be invoked from SPL, including the SPL interfaces that can be used to invoke each of the native functions.

Functions

<xml X, string T> public boolean convertToXML (mutable X xmlResult, T str)

Convert a string to XML, returning the success status.

Parameters
xmlResult

Result XML value, if successful.

str

Input string.

Returns

The value 'true' if the conversion was successful, else 'false'.

<xml X, string T> public boolean convertToXML (mutable X xmlResult, T str, mutable int32 error)

Convert a string to XML, returning the success status and an error code.

Parameters
xmlResult

Result XML value, if successful.

str

Input string.

error

Set to 0 on success, or error status if not successful.

Returns

The value 'true' if the conversion was successful, else 'false'.

<xml X> public boolean isDefaultValue (X val)

Return if this XML value contains the default (uninitialized) value.

Parameters
val

Input XML value to be tests.

Returns

The value 'true' if the XML value is the default (uninitialized) value.

<xml X> public list<rstring> xquery (X value, rstring xqueryExpression)

Execute an XQuery program against an XML value and return a list of results.

Parameters
value

XML value to be queried.

xqueryExpression

XQuery program to be executed.

Returns

List of string results from running the program against the XML value.

<xml X> public list<rstring> xquery (X value, rstring xqueryExpression, map<rstring, rstring> xqueryVars)

Execute an XQuery program against an XML value and return a list of results.

Parameters
value

XML value to be queried.

xqueryExpression

XQuery program to be executed.

xqueryVars

XQuery variable definitions.

Returns

List of string results from running the program against the XML value.

<xml X> public list<rstring> xquery (X value, rstring xqueryExpression, map<rstring, rstring> xqueryVars, mutable int32 error)

Execute an XQuery program against an XML value and return a list of results.

Parameters
value

XML value to be queried.

xqueryExpression

XQuery program to be executed.

xqueryVars

XQuery variable definitions.

error

Set to 0 on success, or error status if not successful.

Returns

List of string results from running the program against the XML value.

<xml X> public list<rstring> xquery (X value, rstring xqueryExpression, mutable int32 error)

Execute an XQuery program against an XML value and return a list of results.

Parameters
value

XML value to be queried.

xqueryExpression

XQuery program to be executed.

error

Set to 0 on success, or error status if not successful.

Returns

List of string results from running the program against the XML value.

<xml X> public list<ustring> xquery (X value, ustring xqueryExpression)

Execute an XQuery program against an XML value and return a list of results.

Parameters
value

XML value to be queried.

xqueryExpression

XQuery program to be executed.

Returns

List of string results from running the program against the XML value.

<xml X> public list<ustring> xquery (X value, ustring xqueryExpression, map<ustring, ustring> xqueryVars)

Execute an XQuery program against an XML value and return a list of results.

Parameters
value

XML value to be queried.

xqueryExpression

XQuery program to be executed.

xqueryVars

XQuery variable definitions.

Returns

List of string results from running the program against the XML value.

<xml X> public list<ustring> xquery (X value, ustring xqueryExpression, map<ustring, ustring> xqueryVars, mutable int32 error)

Execute an XQuery program against an XML value and return a list of results.

Parameters
value

XML value to be queried.

xqueryExpression

XQuery program to be executed.

xqueryVars

XQuery variable definitions.

error

Set to 0 on success, or error status if not successful.

Returns

List of string results from running the program against the XML value.

<xml X> public list<ustring> xquery (X value, ustring xqueryExpression, mutable int32 error)

Execute an XQuery program against an XML value and return a list of results.

Parameters
value

XML value to be queried.

xqueryExpression

XQuery program to be executed.

error

Set to 0 on success, or error status if not successful.

Returns

List of string results from running the program against the XML value.