commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <>
Subject Digester:
Date Wed, 08 May 2002 01:23:29 GMT
Just started using Digester and can't see built-in support for the
scenario where an attribute name doesn't map directly to a bean property
name. For instance, if I've got an element:

<proc name="shutdown" proc-type="admin"/>

and a bean with a procedureType property, how can I get the value of the
proc-type attribute into the procedureType property?

I've gone ahead and written my own rule to handle it, but it seems like
such a common occurrence that I must have missed something. Thanks for
any pointers.

Ah, apologies for reading Javadoc while composing, but can
CallMethodRule/CallParamRule do this?

digester.addObjectCreate("procs/proc", "ProcBean");
digester.addCallMethod("procs/proc", "setProcedureType", 1);
digester.addCallParam("procs/proc", 0, "proc-type");

"Waldhoff, Rodney" wrote:
> > I've got a couple of user questions about Digester, but can only locate
> > a developer list. Is there a list for posting general usage questions?
> There is only commons-dev for now. Post away.

Kris Schneider <>
D.O.Tech       <>
View raw message