commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pretterhofer, Guenter (ext.)" <Guenter.Pretterho...@Dresdner-Bank.com>
Subject [Digester] addSetProperties
Date Wed, 17 Mar 2004 15:07:53 GMT
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");
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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message