default values during JAXB unmarshalling

Hi

I have an XML schema containing several optional elements . I create an XML document adhering to this schema which I am unmarshalling into a java object using JAXB.

If this document doesnt contain some of the optional tags,I want to provide my own default values for those missing fields. How can I achieve this?

For eg. elements of type xsd:double unmarshal to java fields have default value 0.0. I would like to provide my own value instead (eg Double.MIN_VALUE)

Thanks

[507 byte] By [tgifa] at [2007-10-1 0:18:48]
# 1
Set the default attribute in the xsd:element definition.<xsd:element name="a" default=".01" type="xsd:double"/>
dvohra09a at 2007-7-7 16:03:57 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...