File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes How to map arraylist containing a list of hashmaps using castor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to map arraylist containing a list of hashmaps using castor" Watch "How to map arraylist containing a list of hashmaps using castor" New topic
Author

How to map arraylist containing a list of hashmaps using castor

radi ranga
Greenhorn

Joined: Feb 01, 2010
Posts: 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">
<map-to xml="listofmaps" />
<field name="list" collection="arraylist" type="java.util.Map">
<bind-xml name="maps" node="element">
<class name="sample.SampleMap">
<map-to xml="mapItem" />
<field name="mapp" collection="map">
<bind-xml name="innerMap">
<class name="org.exolab.castor.mapping.MapItem">
<field name="key" type="java.lang.String">
<bind-xml name="id" node="attribute" />
</field>
<field name="value" type="java.lang.Object">
<bind-xml name="Item" node="element" />
</field>
</class>
<bind-xml>
</field>
</class>
</bind-xml>
</field>
</class>[/code]

Regards,
Radhika
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to map arraylist containing a list of hashmaps using castor