17.10 - Example: XML Parameter in a Java UDF - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - XML Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1140-171K
Language
English (United States)
REPLACE FUNCTION get_XML(X1 XML)
RETURNS INTEGER
LANGUAGE JAVA
NO SQL
PARAMETER STYLE JAVA 
EXTERNAL NAME 'UDF_JAR:UserDefinedFunctions.get_XML';

public static int get_XML(java.sql.SQLXML xml_var) throws SQLException

Alternatively, you can define the function as follows:

REPLACE FUNCTION get_XML(X1 XML)
RETURNS INTEGER
LANGUAGE JAVA
NO SQL
PARAMETER STYLE JAVA 
EXTERNAL NAME 'UDF_JAR:UserDefinedFunctions.get_XML(java.sql.SQLXML) returns int';

public static int get_XML(java.sql.SQLXML xml_var) throws SQLException