Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 16916 invoked from network); 1 Sep 2005 18:47:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Sep 2005 18:47:16 -0000 Received: (qmail 76993 invoked by uid 500); 1 Sep 2005 18:47:15 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 76976 invoked by uid 500); 1 Sep 2005 18:47:14 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 76963 invoked by uid 99); 1 Sep 2005 18:47:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2005 11:47:14 -0700 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [206.190.49.122] (HELO web54312.mail.yahoo.com) (206.190.49.122) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 01 Sep 2005 11:47:27 -0700 Received: (qmail 32923 invoked by uid 60001); 1 Sep 2005 18:47:10 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=kFpGtQG0LoaVSbvLaoPMZ8SEIY9dD5OWVOue8U41PJ5XW4e0eAISMBFEwcAHlxJOXPLXhkCXG/Jvics2nPpvpMdwwluAK2w6+escBVj4/dVVkkYitrS7qcPjfOUHfgjCzUysdVY+2RNIOSIX0dR05+l39gbJbhIbfWFhDVDgFK4= ; Message-ID: <20050901184710.32921.qmail@web54312.mail.yahoo.com> Received: from [129.43.2.87] by web54312.mail.yahoo.com via HTTP; Thu, 01 Sep 2005 11:47:10 PDT Date: Thu, 1 Sep 2005 11:47:10 -0700 (PDT) From: Uma S Mudunuri Subject: Re: problem retrieving xml results from oracle xmldb To: user-java@ibatis.apache.org In-Reply-To: <4317418A.400@tde.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks Mike that solved my problem --- Mike Fagan wrote: > When returning a oracle XMLType to ibatis use the > getClobVal()/getStringVal() function and it work > fine. > That is why your extractValue works because it > returns varchar2. > > so try > > > SELECT extract(value(x),'/employee').getClobVal() > xml > FROM employees > > > > Mike Fagan > > Uma S Mudunuri wrote: > > >Thanks for the reply. Guess I have to go with the > JDBC > >implementation atleast for now. > > > >--- Jan Vissers wrote: > > > > > > > >>I'm guessing this has to do with the fact that > >>iBatis doesn't support > >>the Oracle XMLType datatype. I've also been > looking > >>for a way to deal > >>with this, but more in the area of Custom Type > >>Handling. Would be > >>interested if someone has actually managed to do > >>this. In my situation, > >>due to time constraints we decided to implement > >>XMLType operations as > >>JDBC implemenation behind the iBatis DAO framework > >>and do the rest with > >>sqlMap implemantions. > >> > >>Uma S Mudunuri wrote: > >> > >> > >> > >>>Hi, > >>> > >>>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 > >>> > >>> > >>>Scott > >>>1 > >>> > >>> > >>>i) query to get name of the employee > >>> > >>> SELECT extractValue(value(x),'/employee/name') > >>> > >>> > >>name > >> > >> > >>> FROM EMPLOYEES > >>> > >>> This query works fine and the result is 'Scott' > >>> > >>>ii) query to get the whole xml document > >>> > >>> 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. > >>> > >>>Thanks, > >>>Uma > >>> > >>> > >>> > >>> > >>> > >>____________________________________________________ > >> > >> > >>>Start your day with Yahoo! - make it your home > page > >>> > >>> > >>>http://www.yahoo.com/r/hs > >>> > >>> > >>> > >>> > >>> > >>> > >>-- > >>Cumquat Information Technology > >>De Dreef 19 > >>3706 BR Zeist > >>T +31 (0)30 - 6940490 > >>F +31 (0)10 - 6940499 > >>http://www.cumquat.nl > >> > >>Jan.Vissers@cumquat.nl > >>M +31 6 5 11 169 556 > >> > >> > >> > >> > >> > > > > > >__________________________________________________ > >Do You Yahoo!? > >Tired of spam? Yahoo! Mail has the best spam > protection around > >http://mail.yahoo.com > > > > > > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com