commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject RE: [Digester] Parsing XML to a hashtable
Date Tue, 02 Mar 2004 20:57:03 GMT
On Wed, 2004-03-03 at 08:27, Savitsky, Alex wrote:
> Uhh... now I am confused too...
> So let me get it straight - your suggestion is to create a helper class
> XMLContact with getters/setters for each field in Contact, that would
> capture XML data (instead of Contact doing it) and then push it to Contact
> (using existing hashmap-like interface) at every </Contact> occurrence?
> Well, that's exactly what I was trying to avoid - creating accessors for
> each of 30+ fields (and that number will undoubtely grow in the nearest
> future) separately :( Well, that helper class does simplify it a bit, I'll
> try it...
> Another option that I'm going to try is to create my own extension to
> CallParam rule, which would allow passing tag name as a parameter.
> Anyway, thanks for help.

Hi Alex,

Yes, the easiest solution is just to write your own Rule class.

There is a new class in CVS called "PathCallParamRule". You could grab
this class, and tweak it to use the tagname rather than the current
digester match path. It's a *very* simple class. Or see any of the other
rule classes; the PathCallParamRule class is just the closest match to
what you want.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message