17.10 - Example: Using the com.teradata.fnc.SQLXML Class For an IN and OUT XML Parameter - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)

This example returns an XML document that is the duplicate of the input XML document.

REPLACE PROCEDURE dupXML(IN xml_in XML,
                         OUT xml_out XML)
LANGUAGE JAVA
NO SQL
PARAMETER STYLE JAVA 
EXTERNAL NAME 'UDF_JAR:UserDefinedFunctions.dupXML(java.sql.SQLXML, java.sql.SQLXML)';

public static void dupXML(java.sql.SQLXML xml_in,
                          java.sql.SQLXML xml_out) throws SQLException
{

...

}