[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Win a copy of Flex 4 in Action this week in the Flex forum!
Reply Bookmark it! Watch this topic JavaRanch » Forums » Engineering » XML and Related Technologies
 
RSS feed
 
New topic
Author

How to map arraylist containing a list of hashmaps using castor

radi ranga
Greenhorn

Joined: Feb 01, 2010
Messages: 1

We want map an arraylist containing a list of hashmap using castor. We are mapping it as given below. With this mapping we are getting an arraylist containing hashmaps without any key/value pairs :( . Please help us in configuring the same.

[code]<class name="sample.ArrayListOfMaps"> <br /> <map-to xml="listofmaps" /> <br /> <field name="list" collection="arraylist" type="java.util.Map"> <br /> <bind-xml name="maps" node="element"> <br /> <class name="sample.SampleMap"> <br /> <map-to xml="mapItem" /> <br /> <field name="mapp" collection="map"> <br /> <bind-xml name="innerMap"> <br /> <class name="org.exolab.castor.mapping.MapItem"> <br /> <field name="key" type="java.lang.String"> <br /> <bind-xml name="id" node="attribute" /> <br /> </field> <br /> <field name="value" type="java.lang.Object"> <br /> <bind-xml name="Item" node="element" /> <br /> </field> <br /> </class> <br /> <bind-xml> <br /> </field> <br /> </class> <br /> </bind-xml> <br /> </field> <br /> </class>[/code]

Regards,
Radhika
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Engineering » XML and Related Technologies
 
RSS feed
 
New topic
MyEclipse Enterprise Workbench

.