Hi Stephen!

The KEYS are all Strings but the value can be complex value. I checked the thread you pointed me and I this possible to marshal a map without knowing what it contains? For what I understand I need to know the MAPPING to marshal a map. I would like to marshal the map without knowing what it contains and of course be able to unmarshal it after. Is that possible ?

Thanks for your help!

/David

Stephen Bash wrote:

David-

Castor does in general support marshalling and unmarshalling Java
Maps.  In your example, are the Address and PhoneNumber objects the
key and value respectively?  In my work I've almost always used a
primitive key with a complex value, but I'm pretty sure full objects
can be used for both key and value if desired.

For an example of the mapping document Castor would need to handle a
map, see the following post:

http://www.mail-archive.com/[email protected]/msg01939.html

HTH,
Stephen


On 4/2/06, David Gagnon <[EMAIL PROTECTED]> 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 castor to find an answer as well as Betwixt, XMLBeans, JAXB
after trying stuff for few hours .. im just lost:-(
Is that possible to do this with castor .. or any other XML framework?

Thanks to share your knowledge with me :-)

Any help will be appreciated.

Thanks
/David


-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------





-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to