commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norbert Krömeke <N.Kroem...@actosoft.de>
Subject Re: [digester]: Is there a way to populate bean tags by only onecall
Date Fri, 16 May 2003 06:24:29 GMT
Hi Simon,

Thanks for your answer, but haw can I put the "tag-name" and "tag-body" to
my function "addParam" ?

Have I any possibility to extract the "tag-name" if I use "<call-param-rule>"?
Sorry for this naive question, but I am still beginner in this stuff.

Regards,

Norbert


----- Original Message -----
From: "Simon Kitching" <simon@ecnetwork.co.nz>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Friday, May 16, 2003 7:55 AM
Subject: Re: [digester]: Is there a way to populate bean tags by only onecall


> 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 :
> >
> > ...
> > <parameters>
> >    <track1>1234567</track1>
> >    <track2>666666666</track2>
> >    ....
> >    <tag-name>tag-body</tag-name>
> > </parameters>
> >
> > I want to use only one function to collect all this 'sub-tags' from <parameters>
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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


Mime
View raw message