you can specify the unmarshaller flag
 
unm.setIgnoreExtraElements( true );
unm.setIgnoreExtraAttributes( true );
 
By default they are false. All elements or attributes which are not defined by the schema will be ignored.
 
Heri
-----Original Message-----
From: Philip Dodds [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 19, 2005 9:16 PM
To: [email protected]
Subject: [castor-user] Ignoring XML elements while unmarshalling

Is there any way to ignore XML elements/attributes that are in the document that have not been mapped.

 

Basicallly I have an XML document that contains a lot of stuff that I really don’t want to map to objects and I was hoping I could map what I wanted and have Castor ignore anything else.

 

Thanks in advance

 

Philip

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

Reply via email to