commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: AW: DIGESTER/XML-RULES: Accessing attributes in a call-method-rule
Date Mon, 18 Apr 2005 14:25:45 GMT
Hi CK,
> -----Urspr√ľngliche Nachricht-----

> Hallo Raf,
> why don't you use a factory create rule in combination with your own
> abstract object creation factory implementation? This works fine with the
> XML rules and you have complete control over all attributes...
> When <something> is parsed it permits you to access its attributes via
> a_attributes.getQName(i) and
> a_attributes.getName(i), thus you are able to call BeanUtils.setProperty()
> or PropertyUtils.setProperty()
> to populate the properties of your newly created instance...
Thanks for the tip.
What I've currently ended up doing is using <INCLUDE class=''/>
Where extends DigesterRulesSource and adds bar.rule for all
"something" patterns.  I then use bar.rule to step in and access my
sax.Attributes and then manually peek and add my new instance to the
object on the stack.

It feels very dirty though. :)


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

View raw message