Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 53654 invoked from network); 23 Dec 2003 13:31:25 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 23 Dec 2003 13:31:25 -0000 Received: (qmail 17457 invoked by uid 500); 23 Dec 2003 13:31:18 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 17429 invoked by uid 500); 23 Dec 2003 13:31:18 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 17416 invoked from network); 23 Dec 2003 13:31:17 -0000 Received: from unknown (HELO mx1.verat.net) (217.26.64.139) by daedalus.apache.org with SMTP; 23 Dec 2003 13:31:17 -0000 Received: from rubicon (ppp-107-110-SMIN.Verat.Net [62.108.107.110] (may be forged)) by mx1.verat.net (8.12.1/8.12.1) with ESMTP id hBNDVCRI018993 for ; Tue, 23 Dec 2003 14:31:14 +0100 From: "Ivan Rekovic" To: "'Jakarta Commons Users List'" Subject: RE: Digester Question Date: Tue, 23 Dec 2003 14:31:10 +0100 Organization: Intertele AG Message-ID: <000001c3c959$09909b10$6e6b6c3e@rubicon> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal In-Reply-To: <96AD6F62-34D0-11D8-A9FA-000A95A5C6F4@duocash.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The simplest way of grabing ReportSuccesses is to use SetPropertyRule. See documentation in digester distribution for this. Basically you will have to create digester, attach rule (with alias since ReportSuccesses is not valid bean name), add pattern (something like IDTDebitInterface/DebitRequests in your case) and parse file with digester parse method. When parsing is finished you will have property of your bean setted. As for your second question. No. Digester can not create XML documents, but you can look for DOM4J for example witch will suite your needs. > -----Original Message----- > From: Juan Alvarado [mailto:jalvarado@duocash.com] > Sent: Monday, December 22, 2003 11:46 PM > To: commons-user@jakarta.apache.org > Subject: Digester Question > > Hello: > > I am relatively new to xml parsing and I just started using the > commons-digester tools and it seems like it might fit my needs. > > First let me apologize to all you seasoned pros in the field of XML in > the event that my question seems too simple or if I am just not using > the right terminology. > > My question is as follows. > > The particular XML that I am working with and in need to parse is > composed as follows: > > > > > Juan > Alvarado > > > > 123 > 10 > vendordebit > Test > n > > > > > As you can see, the node > contains an attribute ReportSuccesses="true". I need to be able to grab > that value so that it can be populated into my corresponding bean. > Additionally there might be times when there is more than one attribute > in a given node and obviously I would need to get those values also. > Could someone please tell me if this is possible and if so, how to > accomplish this. > > NEXT QUESTION: > > My application not only has to parse this XML stream, but we also have > to create this XML from in certain situations. We might for example > receive a request through the web with the necessary parameters and > values needed to construct the XML and then pass on to the next layer. > Can anyone tell me if the digester framework can handle this and if so, > I'd appreciate some sample code. > > Thanks in advance. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org