commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [Question] Betwix & JAXB
Date Fri, 12 Apr 2002 02:53:25 GMT
From: "Ivelin Ivanov" <>
> Hi James,
> Thanks for the detailed response.
> Yes, choice is healthy.
> I will hope however that the coices stay limited to 1 or 2 alternatives.
> More than that, it will almost sound like waste of brain.
> I am very happy with JXPath and therefore I would think that Betwix is the
> tool I'd use for marshaling in future.

FWIW I have nothing to do with JXPath at all - thats Dmitri's baby. I work
on Jaxen instead (I did try bring Dmitri to the Jaxen-party but he preferred
to go his own way).

Jaxen is an XPath 1.0 conformant XPath engine which works on all popular XML
models. Its the primary XPath engine used by the dom4j, EXML and JDOM
communities. Also DOM users use it, for example David Megginson included
Jaxen for DOM XPath support in the Reuters NewsML toolkit.

> What I really appreciate about JXPath is that it is quite smart about auto
> handling mapping for various types.

Though picking a good default mapping is one thing; however there are
various ways to do it and sometimes developers want to specify this
explicitly - thats where betwixt comes in.

e.g. for a Map

Map map = new HashMap();
map.put( "a", "1234" );
map.put( "b", "5678" );

how should this look as XML? e.g.

    <entry key="a">1234</entry>
    <entry key="b">5678</entry>



Or even


> An inconvenience of Castor is that it's virtually useless without explicit
> mapping.
> If Betwix is going to be a lot more transparent and not require mapping
> most cases, I'd certainly enjoy it.


> BTW, when mapping is not provided, how does betwix handle circular
> references during marshaling? Xlink?

Robert added support for handling of circular references. Right now it
outputs unique IDs and uses HREF attributes to refer to previously
serialized objects.


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

View raw message