I have following attribute in my XSD:
<xs:attribute name="fromFraction" type="xs:float" use="optional" default="0.0"/>
I generate class from this XSD and attribute is created as float
, and then I can't marshall XML without this attribute from this class (as far as I understand, in that case it will always have some value which will be marshalled).
How can I change the XSD to create a Float
type during binding, so I can have null in this field (so it could be omitted during marshalling)?
Or maybe there is a better way to remove this attribute from resulting XML when it isn't present?