Do this Unmarshaller objUnmarshaller = new Unmarshaller(ClasstoUnMarshall.class);
objUnmarshaller.setMapping(mapping); objUnmarshaller.setIgnoreExtraElements(true); objUnmarshaller.setIgnoreExtraAttributes(true); This would avoid the one you asked for. Arun On Thu, 2005-12-29 at 12:10, Saurabh Agrawal wrote: > I am using for marshalling my JAVA object. I wanted to ask the > following thing: > > > > My object has 10 fields as part of it. Now suppose if I set values of > 4 fields and leave rest 6 fields empty. Now I marshal my object. > > > > So I think all 10 fields would be there in my XML.4 fields would have > values and rest 6 fields would be marshaled as empty fields. > > > > My Question: Since I am not sure which all values will be set by my > program, so is there any way out that I can just marshal the values > which are set and not every fields. I cant mark any field as transient > because at times this field would be set and at times it wont be. > > > > I donât want any blank fields in my XML. > > > > Any help in this regard would be appreciated, > > > > Thanks in advance, > > Saurabh > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

