Hello Shweta,

 

This is the way u’ll write your mapping file.

<mapping>

            <class name=” TargetCodes”>

                        <field=” targetCode” type=” TargetCode” collection=”arraylist”/>

            </class>

            <class name=” TargetCode”>

                        <field name=” targetCode” type=”java.lang.String” />

            </class>

 

</mapping>

 

Regards,

Shital

 

-----Original Message-----
From: Shweta Prakash [mailto:[EMAIL PROTECTED]
Sent: Friday, July 09, 2004 10:17 AM
To: [EMAIL PROTECTED]
Subject: [castor-user] Problem making Mapping file, reentrant elements.

 

Hi,

I'm facing a problem while making the mapping file for reentrant elements in XML.

If the xml is
<mainElement>
  <targetCodes>
    <targetCode> t1 </targetCode>
    <targetCode> t2 </targetCode>
    <targetCode> t3 </targetCode>
  </targetCodes>
</mainElement>

Which need to be unmarshalled to the classes.
public class TargetCodes
{
ArrayList targetCodes; //this is an array list of class TargetCode
}

public class TargetCode
{
String targetCode;
}

I'm not able to write mappingXML for the same.
Could you pls help, it's kind of urgent.

rgds
Shweta.



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

Reply via email to