----- Original Message -----
From: "James Strachan" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 9:53 PM
Subject: Re: [Question] Betwix & JAXB


> From: "Ivelin Ivanov" <[EMAIL PROTECTED]>
> >
> > 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).
>
> http://jaxen.org

I've looked at Jaxen first but couldn't find built-in JavaBean support,
which is what I need most of the time.
Java is still my primary language and XML interfaces to the world are being
adopted quickly.
Tools like JXPath and Castor( maybe Betwix now ) are making my life much
easier.

> > 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.

In many cases all these options would be equally good to me.
Rarely do I need to customize, although when it's needed it must be there.

>
> 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.
>
...
> Or

Dmitri can probably help here, but I understand that the following form is
becoming popular:


Map map = myBean.getItem();
map.put( "a", "1234" );
map.put( "b", "5678" );

<item id="a">1234</item>
<item id="b">5678</item>

which is consistent with arrays:

<item id="1">1234</mapName>
<item id="2">5678</mapName >


And thus the XPath is natural "/mybean/item[@id='a']"

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

Excelent. I'll try that.
I suppose it will unmarshall correctly this markup too?


Keep up the good code coming.

Ivelin



>
> James
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


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

Reply via email to