FNC_GetXML Function | C Library Functions | Teradata Vantage - FNC_GetXML - 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

Gets the value of an XML type.

Syntax

void
FNC_GetXML(XML_HANDLE       xmlHandle,
           unsigned char  *xmlBuffer,
           int              xmlBufferSize,
           int            *xmlSize)
XML_HANDLE xmlHandle
A handle to an XML type that is defined to be an input parameter to an external routine.
unsigned char *xmlBuffer
A pointer to the buffer that will hold the XML string.
int xmlBufferSize
The size in bytes of the xmlBuffer passed to FNC_GetXML.
int *xmlSize
The size in bytes of the XML string returned by FNC_GetXML.

Usage Notes

FNC_GetXML is used to get the value of an XML type. The value will be in the UNICODE character set. The XML_HANDLE for the XML type is passed in as input along with a pointer to a buffer (xmlBuffer) and the size of that buffer (xmlBufferSize). xmlBufferSize must be large enough to hold the XML value.

Note that the XML value can contain XML data that is not well-formed.

FNC_GetXML can only be used for inline XML values, that is XML values less than 64K in size. You can use FNC_GetXMLInfo to determine the maximum length of the XML value. You will get an error if you use FNC_GetXML with a LOB-based XML value.