tags:

views:

69

answers:

1

I have the need to extract result of the database query in XML format. I have planned to use JDBC as my programming language. I came across the XML publishing function of IDS 11.0 and planned to use that. Have configured the database settings to perform XML publishing and am able to execute a query in command prompt (dbaccess databasename -) and got XML output. I dont know how to use genxmlquery in JDBC. Someone please help me in this regard.

I have used following line in command prompt and got xml output:

 EXECUTE FUNCTION genxmlquery('newquery','select * from site_info');

I don't know how to do the same using JDBC.

A: 

Treat the statement like you would a SELECT statement in JDBC - it returns data, after all. You'll probably retrieve the data (XML document) into an LVARCHAR or Smart Blob host variable.

Jonathan Leffler
Hi, I have done as you have suggested and was able to see the xml output as first member of the result set. Thanks!