I have a complex object that I return as the return value from the usual "API in which I do not control."
For some API calls, the returned XML looks like this:
<APICall1>
<VeryComplexObject>
<VeryComplexObjectElements... >
</VeryComplexObject>
</APICall1>
No problem, I just use
@XmlElement
private VeryComplexObject VeryComplexObject;
and this is as usual.
But a few challenges want to return:
<APICall2>
<VeryComplexObjectElements... >
</APICall2>
Is there an annotation that I can use to suppress tags <VeryComplexObject>for unmarshal, but get tags from an internal element?
source
share