Empty elements in the xml are always unmarshalled into empty strings. My XSD has a complex element with number type, so during unmarshalling I get a NumberFormatException when it tries to deserialize the empty string into a double. I want to resolve it by giving the element a default value in the XSD, but jibx ignores it.
This is the element from the XSD:
<xs:element name="minimum_amount" minOccurs="0" default="0"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:double"/> </xs:simpleContent> </xs:complexType> </xs:element>
Whenever passing an empty element of <minimum_amount/> to jibx, I get an exception.
|