commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Demuth <supp...@cinebet.de>
Subject Re: [Digester] Parse into HashMap using Commons Digester
Date Tue, 30 Dec 2008 23:32:52 GMT
Sudhi Shetty schrieb:
> I want to parse this into a HashMap where in the 'key' is the library
> name and value is 'List' of Movie instances for that library.
> class Movie {
>    String name;
>    Date releaseDate;
>    String director
> }
>   
Just push the HashMap on the stack before calling parse(). For <library> 
I would probably define my own rule, which would put an empty 
ArrayList<Movie> with the name of library as key into that hashmap. 
Constructing the Movies and adding them to the list should be quit 
simple then.

kind regards
Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message