Hi Martin,
thanks for your answer.
I tried
digester.addSetProperties("/property/database");
instead of
digester.addSetProperties("/property/database", "name", "name");
but the attribute name is still null.
I'm using the follwoing libraries:
commons-digester.jar: 1.5
commons-beanutils.jar: 1.6.1
commons-collections-3.0.jar
commons-logging.jar: 1.0.3
xerces-2.6.2: xml-apis.jar, xercesImpl.jar
Cheers,
G�nter
-----Urspr�ngliche Nachricht-----
Von: Martin Cooper [mailto:[EMAIL PROTECTED]
Gesendet am: Mittwoch, 17. M�rz 2004 18:52
An: Jakarta Commons Users List
Betreff: Re: [Digester] addSetProperties
On Wed, 17 Mar 2004, Pretterhofer, Guenter (ext.) wrote:
> hi all,
>
> maybe somebody can help me with the following problem?
>
> xml-file:
> <property>
> <database name="db1">
> <user>user1</user>
> </database>
> <database name="db2">
> <user>user2</user>
> </database>
> </property>
>
> a small excerpt of the Java source:
> digester.addObjectCreate("property", Property.class);
> digester.addObjectCreate("property/database", Database.class);
> digester.addSetNext("property/database", "addDatabase");
> digester.addSetProperties("/property/database", "name", "name");
Try just:
digester.addSetProperties("/property/database");
--
Martin Cooper
> digester.addBeanPropertySetter("property/database/user", "user");
>
>
> when i print out name and user the output is the following:
> user=user1
> name=null
> user=user2
> name=null
>
> I don't understand why name is always null ...
> what am I doing wrong?
>
> thanks for your help
> g�nter
>
>
> ---------------------------------------------------------------------
> 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]