Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Version 2.4
-
None
-
None
-
None
Description
from issue XMLBEANS-220 it is clear that XMLBeans will generate an optional element declared as nillable="false" with nil="true"
when the setter of the element is called with null as an argument.
If a user doesn't want the (optional) element to appear in the XML (because the XML has to validate against a schema) then he has to call unset..() explicitly or never call the setter at all. This litters the code of the user with null checks.
It would be nice if XMLbeans generates an extra setter which calls unset..() automatically if the argument is null and call the regular setter if the argument is not null.
Attachments
Issue Links
- relates to
-
XMLBEANS-220 XmlObject.xmlText(XmlOptions) outputs xsi:nil="true" where schema definition is minOccurs="0" and default value for nillable="false"
- Closed