You can ignore extra elements by using:
Unmarshaller#setIgnoreExtraElements(true);
--Keith
Bruce Snyder wrote:
On 21 Jan 2005 05:17:10 -0000, Shweta Prakash <[EMAIL PROTECTED]> wrote:
I have an XML with some redundant elements. eg <cybertraveler> <b> bbbb </b>
<test> REDUNDANT </test> </cybertraveler>
Now in the mapping, i don't map the redundant element i.e. "test"
On unmarshalling, castor gives error like. unable to find FieldDescriptor for 'test' in ClassDescriptor of cybertraveler.
Looks like it is mandatory to give field description for all elements...Is there any way to ignore the redundant elements.
In my scenario, i need just a few elements, from the XML.
Shweta,
AFAIK, only the Marshaller abides by the 'transient' attribute on the <field> element, not the Unmarshaller. But maybe Keith will respond with a tip on how to avoid this field when unmarshalling.
Bruce
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
