I am also facing the same problem Paco Fortanet wrote: > > Thanks for the answer, I'm tied with Castor 1.1.1 and I tried that > using this mapping > > <?xml version="1.0" encoding="UTF-8" standalone="yes"?> > <mapping> > <class name="Root"> > <map-to xml="root"/> > <field name="children" collection="map"> > <bind-xml name="children"> > <class name="org.exolab.castor.mapping.MapItem"> > <field name="key" type="string"> > <bind-xml name="key" node="attribute"/> > </field> > <field name="value" type="string"> > <bind-xml node="text"/> > </field> > </class> > </bind-xml> > </field> > </class> > </mapping> > > But all that I get is a hashtable with MapItem objects for both the > key and the value > Is there any solution? > > Thank you > > 2011/1/26 Ralf Joachim <[email protected]>: >> Have you already had a look at: >> http://www.castor.org/how-to-map-a-hashtable.html >> >> Regards >> Ralf >> >> Am 26.01.2011 16:28, schrieb Paco Fortanet: >>> Hi all! >>> >>> just wanted to know what is the correct mapping to unmarshal the xml >>> below to a collection >>> >>> <root> >>> <children key="key1">value1</children> >>> <children key="key2">value2</children> >>> </root> >>> >>> Thanks in advance >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >> >> -- >> >> Syscon Ingenieurbüro für Meß- und Datentechnik GmbH >> Ralf Joachim >> Raiffeisenstraße 11 >> 72127 Kusterdingen >> Germany >> >> Tel. +49 7071 3690 52 >> Mobil: +49 173 9630135 >> Fax +49 7071 3690 98 >> >> Internet: www.syscon.eu >> E-Mail: [email protected] >> >> Sitz der Gesellschaft: D-72127 Kusterdingen >> Registereintrag: Amtsgericht Stuttgart, HRB 382295 >> Geschäftsleitung: Jens Joachim, Ralf Joachim >> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > >
-- View this message in context: http://old.nabble.com/-XML--mapping-a-map-tp30768523p30832665.html Sent from the Castor - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

