I am relatively new to JAXB, but I have a question that seems to be difficult to resolve via online documentation. My goal is simple: I have XML that is being parsed using JAXB, such that elements where included=false
should not be part of the resulting object model.
I would like to solve this within the schema:
<complexType name="baseFilterType">
<simpleContent>
<extension base="string">
<attribute type="string" name="code" use="required"/>
<attribute type="boolean" name="isMandatory" default="false"/>
<attribute type="boolean" name="included" default="true"/>
</extension>
</simpleContent>
</complexType>
<complexType name="baseFiltersType">
<sequence>
<element type="rptt:baseFilterType" name="filter" maxOccurs="unbounded"
minOccurs="0" />
</sequence>
</complexType>
So, how do I change the schema shown above such that the any baseFilterType
where included = false
will not be apart of the object model generated for a baseFiltersType
object.