This is good. I am going to try it soon. I noticed we were still on castor 0.9.3 and that version only supported setIgnoreExtraAttributes(boolean).
Since I seem to have kinda fallen back on the castor version, I will ask another important question :- Does castor handle the static inner classes in the "name" and "type" attribute of Class and Field Descriptors respectively. I know castor 0.9.3 didn't support it. Thanks. Narinder -----Original Message----- From: Keith Visco [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 11:50 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Unmarshalling question. unmarshaller.setIgnoreExtraElements(true); --Keith > Narinder Gaheer wrote: > > Hi all, > > I have a piece of XML that I want to map to my Java Object but I don't > want to map all the elements in my XML. An example :- > > <foo> > <bar>......</bar> > <cat>.....</cat> > <dog>....<./dog> > </foo> > > > public class foo{ > > public void get/setBar() > > public void get/setDog() > > } > > > As it is clear from above example, i don't want to unmarshall the > <cat>,,,,</cat> element and hence omit it from my mapping file, but > castor chokes at it saying no field-descriptor > found for element "cat". > > Is there a way I can stop Castor to "ensure" that everything from the > XML is mapped to my Java Object. > > Narinder ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
