我有类似的东西:
class A {
List<B> params;
C other;
}
class B {
@XmlElements(value = {
@XmlElement(name="d", type=D.class),
@XmlElement(name="e", type=E.class),
@XmlElement(name="f", type=F.class) })
private Object param;
}
如何更改注释以获得如下序列化结果:
<A>
<params>
<f>…</f>
<d>…</d>
<d>…</d>
<e>…</e>
<f>…</f>
<d>…</d>
</params>
<other>…</other>
</A>