我有一个这样的课程:
XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
name = "",
propOrder = {"any"}
)
@XmlRootElement(
name = "DynamicDataRoot"
)
public class Data {
@XmlAnyElement(
lax = true
)
protected List<Object> listOfObject;
public MergeData() {
}
public List<Object> getAny() {
if(this.any == null) {
this.any = new ArrayList();
}
return this.any;
}
}
我需要创建对象数据并添加对象列表 如何将动态Jaxb元素节点添加到此列表中?