I did some snooping in the code and you have to programmatically disable extra elements.
 
        Unmarshaller umr = new Unmarshaller( clzz );
        umr.setMapping( getMapping() );
        umr.setIgnoreExtraElements(true);

 
Steve
----- Original Message -----
Sent: Friday, June 18, 2004 4:56 PM
Subject: [castor-user] Ignoring an XML element

I am resending. I didn't mean to reply to a message. Sorry.
 
 
 
 
 
When umarshalling an object, how do I get castor to ignore elements that it doesn't have a mapping for. If the element doesn't have a class descriptor then just ignore. I tried the following but that doesn't seem to work.
 
----------------------------------------------------------------------------------------------------------------------------------
# True if all documents should be validated by the marshalling framework
#
org.exolab.castor.marshalling.validation=false
# True if all documents should be validated on input by default #
org.exolab.castor.validation=false
----------------------------------------------------------------------------------------------------------------------------------
 
I get the following error XML error for my class.
 
unable to find FieldDescriptor for 'non-session-variables' in ClassDescriptor of user-scenario
 
 
Steve
 


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

Reply via email to