the section on xsi:type at
 http://castor.exolab.org/xml-mapping.html#5.-xsi:type
should help with the polymorphism.

as for the fact that <fruit> represents a list or array,
 the same [above] page provides both a description and
 the usage pattern in section 4 is a basic example that
 includes a collection.  the main thing to know is to
 add a collection="<collection-type>" in your mapping's
 <field> descriptor.

/ eitan


----- Original Message ----- 
From: "Jason Novotny" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 16, 2002 4:20 PM
Subject: [castor-dev] mapping the following XML


> 
> Hi,
> 
>     I'm try to map the following:
> 
> <fruit>
>     <apple/>
>     <pear/>
>     <peach/>
> </fruit>
> 
>     What would be the appropiate mapping entry-- how can I bind a set of 
> XML tags e.g. pear, peach, apple, so what I get back is just a vector of 
> Fruit. Would I have to use inheritance and make a class for each of the 
> entries?
> 
>     Thanks, Jason
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
> 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to