Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 7197 invoked from network); 10 Oct 2005 10:27:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Oct 2005 10:27:49 -0000 Received: (qmail 17130 invoked by uid 500); 10 Oct 2005 10:27:42 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 17108 invoked by uid 500); 10 Oct 2005 10:27:42 -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 17097 invoked by uid 99); 10 Oct 2005 10:27:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2005 03:27:41 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [196.35.77.56] (HELO mfw1.busgateway.is.co.za) (196.35.77.56) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2005 03:27:42 -0700 Received: from BG-SMTP01.he.businessgateway.co.za (Not Verified[196.35.61.109]) by mfw1.busgateway.is.co.za with NetIQ MailMarshal (v5.5.6.7) id ; Mon, 10 Oct 2005 12:27:50 +0200 Received: from meindert ([165.146.141.234]) by BG-SMTP01.he.businessgateway.co.za with Microsoft SMTPSVC(6.0.3790.211); Mon, 10 Oct 2005 12:27:13 +0200 From: "Meindert" To: Subject: RE: XML document output from ibatis Date: Mon, 10 Oct 2005 12:27:11 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcW4fT8o2ERM4OQER3WdcCoKrr+rgwVB1u8w In-Reply-To: <20050913160720.89271.qmail@web32804.mail.mud.yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: X-OriginalArrivalTime: 10 Oct 2005 10:27:14.0097 (UTC) FILETIME=[2E4B7A10:01C5CD85] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I can't find info about the use of a RowHandler in the wikki. Could anybody please post code/example for returning an org.w3c.dom.Document using a RowHandler? -----Original Message----- From: Ashish Kulkarni [mailto:kulkarni_ash1312@yahoo.com] Sent: 13 September 2005 06:07 PM To: user-java@ibatis.apache.org Subject: Re: XML document output from ibatis Parshanth do you have a code/example of such DAO --- Prashanth Sukumaran wrote: > Hi Ashish, > > Cool this is fine. But the idea of a RowHandler is > to have such conversions out of the DAO. Also it > looks clean as if IBatis is returning the Document > object. > > The work of the DAO layer is to only execute queries > and return the data. You can externalize such > transformations into the RowHandler. > > Rgds > Prashanth Sukumaran. > > Ashish Kulkarni wrote: > Hi > this is a way i got around my problem > // definiation in xml file > > parameterClass="java.math.BigDecimal"xmlResultName="PO">// > SQL querry goes herre > // to get a list of all data from ibatis > > List list = client.queryForList("getdata", new > BigDecimal("12345")); > // go through the list > for (int i = 0; i < list.size(); i++) > { > String obj = (String) list.get(i); > // get byte array input stream from string > ByteArrayInputStream byteArray = new > ByteArrayInputStream(obj.getBytes()); > // create DMO object > Document doc = > factory.newDocumentBuilder().parse(byteArray); > } > > > Ashish > > > --- Larry Meadors wrote: > > > Wit apologies to Clinton, my official opinion on > > iBATIS XML results is > > that they suck. > > > > If you want to do what you are describing, do it > in > > your DAO class. If > > you want multiple records, do it with a > RowHandler. > > > > Larry > > > > > > On 9/12/05, Ashish Kulkarni > > wrote: > > > Hi > > > Is it possible to get XML document from ibatis > > > I am trying to get a XML document as a > resultClass > > > from ibatis, here is what i am doing > > > > > parameterClass="java.math.BigDecimal"> > > xmlResultName="PO" >> > SELECT A.PCPORD AS PCPORD> > > from Pu1012> > WHERE A.Pcpord = #value#> > > > > String str = > > > (String)client.queryForObject("getPOData", > poNum); > > > > > > I cannot define resultClass = > > "org.w3c.dom.Document" > > > > > > Is it possible to do so > > > > > > Ashish > > > > > > > __________________________________________________ > > > 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 > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com A$HI$H __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.19/92 - Release Date: 07/09/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.11.13/126 - Release Date: 09/10/2005