I use this xsd to validate my sample xml which has a field by name List
<List>abc def ghi</List>.
When I am unmarshalling the xml I am able to populate these values into a string array successfully.
But when the same element doesn't have any element, ie <List></List>, while unmarshalling I get a Null Pointer Exception. My inference is that in case of elements which are of type list, Castor expects elements to be present so that it can assign them into a string array object. In some cases there will be a valid scenario where elements will not be present. Could anyone help me out with this problem. Is there any other declaration I need to make in my xsd, so that while unmarshalling, an empty array object is obtained?