Convert nil=“true” to null during unmarshal operation
问题 I am receiving XML from a server whose schema specifies nearly every element as: <xs:element name="myStringElementName" type="xs:string" nillable="true" minOccurs="0"/> <xs:element name="myIntElementName" type="xs:int" nillable="true" minOccurs="0"/> I'm trying to find a clean way to convert every element that I receive that is marked as xsi:nil="true" to a null when it is unmarshalled into a JAXB object. So something like this: <myIntElementName xsi:nil="true" /> Should result in my JAXB