I'm reading in a malformed XML (out of my control), the file type is of OFX. I was hoping to use Jackson XML to deserialize. Here is a sample of the file
<OFX>
<SIGNONMSGSRSV1>
<SONRS>
<STATUS>
<CODE>0
<SEVERITY>INFO
<MESSAGE>OK
</STATUS>
<DTSERVER>20220904084713[-5]
<LANGUAGE>ENG
<INTU.BID>00315
</SONRS>
</SIGNONMSGSRSV1>
</OFX>
I'm using the XMLMapper like this:
XmlMapper xmlMapper = XmlMapper.builder()
.enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES)
.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true)
.configure(DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES, false)
.build();
I was hoping there was a way to still parse this poorly formatted XML and ignore the missing closing tags, or do I need to create a way to read the Status Object differently?