ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uma S Mudunuri <uma_...@yahoo.com>
Subject problem retrieving xml results from oracle xmldb
Date Wed, 31 Aug 2005 14:22:17 GMT

I am trying to use iBATIS to retrieve results from
Oracle's XML DB database(which stores whole xml
documents). It works fine when the results are the
text value of an element but when I try to use
functions to get whole or part of the xml document it
does not return any results. The query works fine when
executed directly in oracle. I am new to iBATIS and
have searched the archives and faq's but did not find
anything related. 

An example xml file in the database


i) query to get name of the employee
  <statement ....>
  SELECT extractValue(value(x),'/employee/name') name 
  This query works fine and the result is 'Scott'

ii) query to get the whole xml document
   <statement ....>
   SELECT extract(value(x),'/employee') xml
   FROM employees

   does not return anything 

I am guessing that the problem is because of the fact
that the result is an xml document and I would like to
know if there's any way to handle these queries in
iBATIS. Any help would be greatly appreciated.


Start your day with Yahoo! - make it your home page 

View raw message