geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@coredevelopers.net>
Subject Re: [vote] XML Parsing
Date Tue, 02 Sep 2003 22:22:42 GMT
On Tuesday, September 2, 2003, at 07:44 AM, James Strachan wrote:

> On Tuesday, September 2, 2003, at 12:56  am, Dain Sundstrom wrote:
>> I think we should just use Digester directly.
>
> Why?

The introspection makes me wary.  If they change the rules, all of our 
stuff breaks.  Besides that, I think the "digester glue" code you 
complain about below is simple to read and understand.

Anyway, I have some digester code I'll check in later, and when I do 
maybe you can show me how much easier it would have been with Betwixt.

>> Betwixt looks interesting but I don't see why we need it.
>
> It defaults the Digester rules for you - provided you follow some real 
> simple naming conventions (getters, setters, adders).

What happens when you have exceptions and non trivial mappings.  For 
example, I have a place where I named an xml attribute named "class", 
but the class attribute is named "name" because the spec calls it that 
(and the spec is wrong).

>> I wrote some digester code the handle mbean description files in 
>> about 20 minutes (without knowing anything about Digester).
>
> Betwixt auto-defaults the Digester rules using introspection so it 
> saves writing all that Digester glue. Also note that Digester is read 
> only - it cannot generate XML. Betwixt defaults digester rules to 
> parse XML and can generate XML from the beans if required.

Cool.  Can Digester do this or does digester do something special to 
make it happen?

-dain


Mime
View raw message