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

Teradata Vantageā„¢ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

Returns an XML value into a buffer in UTF-8 encoding.


FNC_GetXMLByte(XML_HANDLE      xmlHandle,
               byte          *xmlBuffer,
               int             xmlBufferSize,
               int           *xmlSize)

Syntax Elements

A handle to an XML type that is defined to be an input parameter to an external routine.
A pointer to the buffer that will hold the XML string.
The size in bytes of the xmlBuffer passed to FNC_GetXMLByte.
The size in bytes of the XML string returned by FNC_GetXMLByte.

Usage Notes

FNC_GetXMLByte is used to get the value of an XML type in UTF-8 binary encoding.

The XML_HANDLE is passed in as input along with a pointer to a buffer (xmlBuffer) and the buffer size (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_GetXMLByte can only be used for inline XML values, that is XML values less than 64K. You can use FNC_GetXMLInfo to determine the maximum length of the XML value. If FNC_GetXMLByte is used with a LOB-based XML value, you will get an error.