From: "Leon Smith" <[EMAIL PROTECTED]>
> Hi all,
>
> I've just recently replaced my home grown unmarshalling layer with
Digester (what a kick ass product) and have started moving into Betwixt for
the mashalling side. After getting into it, it looks like to guarantee round
trip marshal/unmarshal, I need to use Bewtixt instead of Digester directly.
But what do I lose ? Can Betwixt represent everything that Digester can on
the unmarshalling side ?


Betwixt defaults digester rules. So you can always add your own Digester
rules as well. i.e. Betwixt uses Digester, so you still get access to the
same digester.


> Almost as important though, since I have >100 classes to create .betwixt
files for, is there any utility that can help ? Even if it just introspects
and creates a skeleton file that I can change by hand.
>
> Is there a utility to convert Digester XML rule sets to Betwixt files ?
>
> What are the chances of getting
XMLIntrospector>>setWrapCollectionsInElement and
BeanWriter>enablePrettyPrint as options in the .betwixt files ?

Another option could be to have a special factory to create your
XMLIntrospector, setting the default behaviours of things like
wrapCollectionsInElement etc. Then for 'global' properties you don't need to
bother with .betwixt files.

e.g. take a look in the commons sql project, in particular the
DatabaseReader and DatabaseWriter for how a bean model is read & written
using betwixt without any .betwixt files...

http://cvs.apache.org/viewcvs.cgi/jakarta-commons-sandbox/sql/src/java/org/a
pache/commons/sql/io/


James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to