You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by David Gagnon <dg...@siunik.com> on 2006/04/02 16:22:27 UTC

Betwixt question: Is it possible to marshal/unmarshal HashMap that contains custom type (CivicAddress, PhoneNumber) whith betwixt?

Hi all,

I'm searching a way to marshal a hashmap that contains custom type like 
a CivicAddress, PhoneNumber into an XML file.

I need to be able to read this XML and getting back the same HashMap 
with the same properties.The properties in the Map aren't known.

I look into betwixt to find an answer as well as Castor, XMLBeans, JAXB 
after trying stuff for few hours .. im just lost:-(
Is that possible to do this with betwixt .. or any other XML framework?
Thanks to share your knowledge with me :-)

Any help will be appreciated.

Thanks
/David


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: Betwixt question: Is it possible to marshal/unmarshal HashMap that contains custom type (CivicAddress, PhoneNumber) whith betwixt?

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Sun, 2006-04-02 at 10:22 -0400, David Gagnon wrote:
> Hi all,
> 
> I'm searching a way to marshal a hashmap that contains custom type like 
> a CivicAddress, PhoneNumber into an XML file.
> 
> I need to be able to read this XML and getting back the same HashMap 
> with the same properties.The properties in the Map aren't known.
> 
> I look into betwixt to find an answer as well as Castor, XMLBeans, JAXB 
> after trying stuff for few hours .. im just lost:-(

maps are a controversial subject in the xml binding community: there's
not a really naturally way to express them.

> Is that possible to do this with betwixt .. or any other XML framework?
> Thanks to share your knowledge with me :-)

betwixt supports maps. see the section on in
http://jakarta.apache.org/commons/betwixt/guide/binding.html

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org