16.20 - Example: XML Parameter in a Java UDF - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ XML Data Type

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1140-162K
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