FNC_SetXMLBlob Function | C Library Functions | Teradata Vantage - FNC_SetXMLBlob - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

Set the value of an XML type using a BLOB locator.

Syntax

void
FNC_SetXMLBlob(XML_HANDLE            xmlHandle,
               LOB_RESULT_LOCATOR    xmlBlob)
XML_HANDLE xmlHandle
A handle to an XML type that is defined to be a return value for a UDF/UDM or an INOUT/OUT parameter to an external stored procedure.
LOB_RESULT_LOCATOR xmlBlob
A LOB locator for the BLOB containing the return value for the XML type.

Usage Notes

FNC_SetXMLBlob is used to set the XML return value or OUT parameter value using a LOB locator.

The XML handle xmlHandle is passed as input along with a LOB locator xmlBlob. The xmlBlob locator value is obtained by calling FNC_GetXMLResultBlob and LOB FNC routines are used to set the BLOB value. It is then passed to the FNC_SetXMLBlob routine. UTF-8 encoding should be used to write to the BLOB.

Note that the BLOB passed to this routine must contain well-formed XML data, otherwise you will get an error.

FNC_SetXMLBlob can only be called for LOB-based XML values, otherwise you will get an error.