Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Oracle, XML and JDBC with ANT--Can I use Oracle's XML functions with JDBC?

Oracle, XML and JDBC with ANT--Can I use Oracle's XML functions with JDBC?

From: Renick, Garrel <garrel_at_more.net>
Date: Wed, 15 Jun 2005 13:55:07 -0500
Message-ID: <26C435999318FC49A6AB243CC8ACA62302266EE5@UM-EMAIL07.um.umsystem.edu>


I'm trying to get an XML result set from an Oracle 9i server using ANT's SQL task with the Oracle JDBC Thin Driver. I can successfully connect to the database and issue standard SQL through the ANT SQL task and get the expected result set. However, if I issue SELECT statements with Oracle's XML-related functions, the output file for the results contains values that do not match those returned by Oracle's SQLPlus command line interpreter. I'm not an Oracle guy, so any insight into what my problem may be would be appreciated.

Here's my query:

SELECT XMLELEMENT("Document") FROM some_view_at_some_server where rownum<10;

Oracle's SQLPlus returns these results:

XMLELEMENT("DOCUMENT")


<Document></Document>
<Document></Document>
<Document></Document>
<Document></Document>
<Document></Document>
<Document></Document>
<Document></Document>
<Document></Document>
<Document></Document>

9 rows selected.

The same query from ANT's SQL task using JDBC returns this:

XMLELEMENT("DOCUMENT")
null
null
null
null
null
null
null
null
null

0 rows affected

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 15 2005 - 15:00:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US