commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: Fwd: Managing XML Output from Betwixt
Date Thu, 06 Oct 2005 18:05:59 GMT
those of us who use filter will pick up questions much quicker if you
prefix the subject (add [betwixt]). see

On Mon, 2005-10-03 at 11:46 -0400, Sameer Nanda wrote:
> Well thanks again Russell,
> Whatever you said is true, I can either rename my Class to a lowercase
> authorization (but then I am breaking the naming convention for writing Java
> classes which I dont wanna do) , and I could also run the replaceAll() on
> the XML string generated to replace all <Authorization> to <authorization>
> (but that would be a hack).
> My point here is, it shouldnt have to be like that ....... theres gotta be
> something in Betwixt using which I can do this. I mean this is just one
> example I am talking here, I have to generate much more complex XML
> documents which would involve a lot of Java Bean Objects, which in turn
> would contain a bunch of other Java Beans. Do you know what I mean?

there are two different (complementary) ways to configure betwixt. you
can use strategies
to influence generic behaviour and dot betwixt files to specify mappings for a particular
class. these strategies are set on the appropriate configuration objects (IntrospectionConfiguration
on XMLIntrospector for introspection time strategies, BindingConfiguration for bind time strategies).

in general, to change the way that betwixt maps java names to xml names,
you need to replace the default NameMapper strategy.
CapitalizeNameMapper probably does what you need.

- robert

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

View raw message