I hope the following can help. In digester, you add rules to handle any
element. for example, you can use two rules:
digester.addRule( "phonebook/entry", new ObjectCreationRule(
"package.name.Entry" ) );
digester.addRule( "phonebook/entry/number", new
BeanPropertySetterRule("numberField") );
the first rule to handle the 'entry' element and the 2nd for 'number'. The
rules are example and you can use any rules.
I'm not very good in Digester. Please ask others if the above cannot help.
regards,
mingfai
> -----Original Message-----
> From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 13, 2003 2:59 PM
> To: [EMAIL PROTECTED]
> Subject: Digester question
>
>
> Is it possible to handle duplicate elements in commons digester using
> the following example ?
>
>
> <phonebook>
> <entry>
> <owner>Owner</owner>
> <number>Number</number>
> [ and many other numbers to follow..]
> </entry>
> </phonebook>
>
> I can handle many <entry> elements but can't quite yet grasp how to do
> the multiple number elements. Does anyone have any idea how to do this ?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]