Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 94043 invoked from network); 16 May 2003 05:53:04 -0000 Received: from unxcoms01.ecnetwork.co.nz (202.135.116.201) by daedalus.apache.org with SMTP; 16 May 2003 05:53:04 -0000 Received: from serpent.ecnetwork.co.nz (serpent.ecnetwork.co.nz [202.135.190.10]) by unxcoms01.ecnetwork.co.nz (8.12.8/8.12.8) with SMTP id h4G5sTm1013039 for ; Fri, 16 May 2003 17:54:30 +1200 Received: (qmail 19754 invoked by uid 0); 16 May 2003 05:52:16 -0000 Received: from pcsimon.ecnnz.ecnetwork.co.nz (202.135.190.44) by serpent.ecnetwork.co.nz with SMTP; 16 May 2003 05:52:16 -0000 Subject: Re: [digester]: Is there a way to populate bean tags by only one call From: Simon Kitching To: Jakarta Commons Users List In-Reply-To: <001101c31b6b$256bfab0$0202a8c0@ACSW2KHHNKE> References: <001101c31b6b$256bfab0$0202a8c0@ACSW2KHHNKE> Content-Type: text/plain; charset=ISO-8859-15 Organization: Message-Id: <1053064513.2524.243.camel@pcsimon.ecnnz.ecnetwork.co.nz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2-3mdk Date: 16 May 2003 17:55:15 +1200 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Fri, 2003-05-16 at 17:22, Norbert Kr�meke wrote: > Hi, > > I'm looking for the solution to resolve fallowing problem. The XML input > looks like this : > > ... > > 1234567 > 666666666 > .... > tag-body > > > I want to use only one function to collect all this 'sub-tags' from by > call of addParam(tag-name, tag-body). > > How can I do it if I use digester-rules.dtd file. I've not done this myself, so the following is just a guess. I think you'll first have to use "ExtendedBaseRules" rather than the default "RulesBase" class as the pattern-matching engine, so that you can use patterns with trailing wildcards. I don't know if the XmlRules stuff allows you to do this from an xml config file, but it is easy to do in code: digester.setRules(new ExtendedBaseRules()); You should then be able to add a CallMethodRule triggered by the pattern "parameters/*". Regards, Simon