Dear Werner,
Your assumption is valid. I don't want to create an InterChange Object.
All i am interested in is populating my Addressbook object.
Thanks.
Werner Guttmann wrote:
>
> Can I assume that you do not have a Java class that corresponds to the
> <interchange> element ?
>
> Werner
>
> kirran wrote:
>> Any help is appreciated.
>>
>> I have an xml file with root element named 'interchange'. I 'd like to
>> only
>> parse 'addressbook' element beneath it and not concerned about the root
>> element. So, i only define these mappings in my mapping file(shown
>> below).
>> How can i get around the following error which i believe is happening as
>> i
>> am not mapping 'addressbook' as part of 'interchange' element.
>>
>>
>> org.exolab.castor.xml.MarshalException: unable to find FieldDescriptor
>> for
>> 'addressbook' in ClassDescriptor of addressbook{File: [not available];
>> line:
>> 2; column: 52}
>>
>>
>> ***********
>> mapping file:
>>
>> <?xml version="1.0"?>
>> <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version
>> 1.0//EN" "http://Castor.org/mapping.dtd">
>>
>> <mapping>
>>
>> <class name="Person">
>> <field name="name" >
>> <bind-xml name="name" node="attribute" />
>> </field>
>> </class>
>>
>> <class name="Addressbook">
>> <field name="persons" type="Person" collection="collection" />
>> </class>
>>
>> </mapping>
>>
>> ******************
>> xml file:
>>
>> <interchange name="inter">
>> <addressbook>
>> <person name="tom"/>
>> <person name="pete"/>
>>
>> </addressbook>
>> </interchange>
>>
>> Thanks in advance.
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
--
View this message in context:
http://www.nabble.com/castor-mapping-issue-tf4761277.html#a13628596
Sent from the Castor - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email