Hi, I am not actually convinced that this is an issue related to whitespace handling at all. I think that this is an issue in the context of multi-valued fields when used together with locations.
Anyhow, to be able to look into this, can I please ask you create a new Jira issue at http://jira.codehaus.org/browse/CASTOR and attach a (minimal) working test case. Regards Werner Mihir Mathuria wrote: > > Hello Gurus, > > Need your help regarding unmarshalling and whitespaces. > > I spent quite some time on this issue and tried following advices in > earlier posts, but in vain. > > I have the following xml: > > <categories> > <category label='Male Female'/> > <category label='Sports'/> > </categories> > > > I try to unmarshal that using the following mappings: > > <field name="columnHeaders" collection="arraylist" type="string"> > <bind-xml name="label" location="categories/category" > node="attribute"/> > </field> > > However the columnHeaders arrayList comes up with 3 elements ['Male', > 'Female', 'Sports'] instead of just two ['Male Female','Sports'] > > > After the creating the Unmarshaller I do make sure preserveWhitespace > is set to 'true' > unmarshaller = context.createUnmarshaller(); > unmarshaller.setWhitespacePreserve(true); > > But this does not help. > > I also tried adding "xml:space='preserve'" in the <category> node above. > No luck. > > I am running out of ideas. Some one please guide. > > I am using castor 1.3 > > Thanks. > Mihir. > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

