如
<Body>
<TransferInfo>xxxx </TransferInfo>
<TransferInfo>xxxx </TransferInfo>
</Body>
@XmlRootElement(name = "Body")
public class ResultNofityBody {
private List<ResultNofityTransferInfo> list;
@XmlElements({ @XmlElement(name = "TransferInfo", type = ResultNofityTransferInfo.class) })
public List<ResultNofityTransferInfo> getList() {
return list;
}
public void setList(List<ResultNofityTransferInfo> list) {
this.list = list;
}
}
jaxb Element下怎么设置多个同名的子Element,布布扣,bubuko.com
jaxb Element下怎么设置多个同名的子Element
原文:http://blog.csdn.net/leehu1987/article/details/22948511