Is it possible to "intercept" the unmarshalling process of JAXB
?
I have an xml reponse that partially should be converted to a different java fields structure:
<xml>
<X_FIELD1></X_FIELD1>
<X_FIELD2></X_FIELD2>
...
<X_FIELD11></X_FIELD11>
</xml>
In my java class, I'd prefer to unmarshal this to a List<String>
, instead of 11 String
fields.
public class XmlResponse {
private String X_FIELD1;
private String X_FIELD2;
//...
private String X_FIELD11;
// private List<String> xFields;
}
But is that possible?