Hello,

I'm trying to unmarshall same type of class in different contexts
(elements).

For example, I have a class called Car, then I would like to have the
following XML unmarshalled

<factory>
   <BlueCar>
      <name>BMW</name>
   </BlueCar>
   <RedCar>
      <name>Volvo</name>
   </RedCar>
</factory>

I have a binding for Car class in my mapping file
<class name="Car" auto-complete="true"/>

but the problem is when I have my mapping for the factory. How should I
represent this situation as below doesnt work:

<class name="Factory">
  <map-to xml="factory"/>
  <field name="redCar" type="Car">
    <bind-xml name="BlueCar"/>
  <field name="blueCar" type="Car">
    <bind-xml name="RedCar"/>
</class>

Any help would be highly appreciated!

-- 
View this message in context: 
http://www.nabble.com/Unmarshalling-same-class-in-diffrent-elements-tp24035730p24035730.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


Reply via email to