You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Steve Blom <st...@yahoo.com> on 2004/11/09 19:40:14 UTC
Key/Value setting
Hi,
I'm trying to put contents into a map object like so:
<people>
<person id="Jon">
...
</person>
<person id="Sue">
...
</person>
<people>
I have a person object, that i want to store in a map
with the key being the person id. Is this possible? I
think I'm close, but missing on something.
digester.setObjectCreate("people", java.util.HashMap);
digester.setObjectCreate("people/person",
bean.Person.class);
digester.setCallMethod("people/person", "put", 2);
digester.setCallParam("people/person", 0, "id");
digester.setCallParam("people/person", 1); ?
The id is set right, but the object value isn't. What
am i missing?
Thanks - Steve
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org