C++ Native Functions: spl.XML
- <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.
Starting with Streams v4.2.1.1, the xquery functions use the default namespace of the queried XML. If the xquery() function is given an xqueryExpression without a namespace declaration, then it returns an empty result if the queried document has an explicit namespace.
For the following example data:
<Orders xmlns="http://example.com"> <Transaction TxID='100' TxType='return'> <Item count='3'>Shorts</Item> </Transaction> </Orders>
The xqueryExpression "declare default element namespace http://example.com ; /Orders/Transaction[@TxType = 'return']/Item/text()" would correctly return the string "Shorts".
- 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.
Starting with Streams v4.2.1.1, the xquery functions use the default namespace of the queried XML. If the xquery() function is given an xqueryExpression without a namespace declaration, then it returns an empty result if the queried document has an explicit namespace.
- 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.
Starting with Streams v4.2.1.1, the xquery functions use the default namespace of the queried XML. If the xquery() function is given an xqueryExpression without a namespace declaration, then it returns an empty result if the queried document has an explicit namespace.
- 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.
Starting with Streams v4.2.1.1, the xquery functions use the default namespace of the queried XML. If the xquery() function is given an xqueryExpression without a namespace declaration, then it returns an empty result if the queried document has an explicit namespace.
- 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.
Starting with Streams v4.2.1.1, the xquery functions use the default namespace of the queried XML. If the xquery() function is given an xqueryExpression without a namespace declaration, then it returns an empty result if the queried document has an explicit namespace.
- 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.
Starting with Streams v4.2.1.1, the xquery functions use the default namespace of the queried XML. If the xquery() function is given an xqueryExpression without a namespace declaration, then it returns an empty result if the queried document has an explicit namespace.
- 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.
Starting with Streams v4.2.1.1, the xquery functions use the default namespace of the queried XML. If the xquery() function is given an xqueryExpression without a namespace declaration, then it returns an empty result if the queried document has an explicit namespace.
- 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.
Starting with Streams v4.2.1.1, the xquery functions use the default namespace of the queried XML. If the xquery() function is given an xqueryExpression without a namespace declaration, then it returns an empty result if the queried document has an explicit namespace.
- 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.