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.
--
View this message in context:
http://www.nabble.com/castor-mapping-issue-tf4761277.html#a13616792
Sent from the Castor - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email