Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 31168 invoked from network); 26 Jul 2004 23:49:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 26 Jul 2004 23:49:08 -0000 Received: (qmail 20904 invoked by uid 500); 26 Jul 2004 23:49:00 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 20833 invoked by uid 500); 26 Jul 2004 23:48:59 -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 20820 invoked by uid 99); 26 Jul 2004 23:48:59 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [202.135.116.201] (HELO unxcoms01.ecnetwork.co.nz) (202.135.116.201) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 26 Jul 2004 16:48:57 -0700 Received: from serpent.ecnetwork.co.nz (serpent [202.135.190.10]) by unxcoms01.ecnetwork.co.nz (8.12.8/8.12.8) with ESMTP id i6QNmnc1016719 for ; Tue, 27 Jul 2004 11:48:50 +1200 Received: from pcjohns.ecnnz.ecnetwork.co.nz (unknown [202.135.190.30]) by serpent.ecnetwork.co.nz (Postfix) with ESMTP id A3AE11035 for ; Tue, 27 Jul 2004 11:49:14 +1200 (NZST) Subject: Re: [Digester] basic usage problem. Help me understand the stack. From: Simon Kitching To: Jakarta Commons Users List In-Reply-To: <7dd64355040726141575887d73@mail.gmail.com> References: <7dd64355040726141575887d73@mail.gmail.com> Content-Type: text/plain Message-Id: <1090885729.6440.11.camel@pcsimon> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 27 Jul 2004 11:48:49 +1200 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Tue, 2004-07-27 at 09:15, Dan Tarkenton wrote: > Hello, I've used Digester a few times in the past with much success. > Mostly, I've parsed XML documents and simply grabbed the attributes, > and not the body text. I was looking through the documentation at > http://jakarta.apache.org/commons/digester/api/ the digester package > specifically. When I came across the example of parsing the web.xml > file to grab body text. I figured, hey, this should be easy. > > I have an xml document that has several elements named Part. I > essentially want to parse the XML document and create a collection of > Parts. Simple, right? Well, I'm embarrased to say I can't figure out > why I only get one Part object in my resulting Hashtable when I run > the Digester. And I can't figure out why only the first Part element > in my document is the one that shows up. So I figure i'm not parsing > recursively or something. You may wish to have a look at the code in the "examples" directory in CVS. These examples cover many of the basic tasks Digester can be used for. In particular, the "addressbook" and "catalog" examples may be useful. http://cvs.apache.org/viewcvs.cgi/jakarta-commons/digester/src/examples/api/ Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org