users@jaxb.java.net

accessing _has elements

From: Jon Richards <jonrichards_at_onetel.net.uk>
Date: Wed, 10 Dec 2003 07:36:18 -0000

Appologies if this is not the correct forum for this question.

I have generated classes for a schema where some elements are
minoccurs="0".

After unmarshalling I would like to know whether the element
was present or not. Objects are fine as they return null, but
base types like int will return 0.

Unfortunately the 'has' attributes in the impl classes are
protected, and the type interface does not provide access
methods for these attributes.

Is there a way of finding out whether elements were present
or not? If not is it appropriate for the next JAXB release to
add access methods for the 'has' methods?

Regards,

Jon Richards.