XML - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
Teradata Vantageā„¢

C Data Type Definition

typedef int XML_HANDLE;

Usage

Use the XML_HANDLE data type when passing an XML instance as an argument or returning an XML type result.

Here is an example using an XML parameter in a UDF definition and XML_HANDLE in a C function declaration.

SQL Function Definition Equivalent C Function Declaration
CREATE FUNCTION F1 (A XML(100))
RETURNS XML(100)
 ...;
void f1( XML_HANDLE *a,
         XML_HANDLE *result,
         ... )
{  ... }

UDFs, UDMs, and external stored procedures can also process XML data as VARCHAR, CLOB, VARBYTE, or BLOB values. You can use the XMLSERIALIZE function to serialize an XML value to a VARCHAR, CLOB, VARBYTE, or BLOB value before passing the value to an external routine. You can use the CREATEXML function to create an XML type value from the results of an external routine.

For information about the XMLSERIALIZE and CREATEXML functions, see Teradata Vantageā„¢ - XML Data Type, B035-1140.

Therefore, in addition to the XML_HANDLE data type, you can also use the following C data types as parameters and return types of UDFs, UDMs, and external stored procedures that process XML: