试试这个:
@XmlRootElement(name="car")...public class Car { ... @XmlElementWrapper(name="recalls") // this name=... can be omitted, as it // is the same as the field name @XmlElement(name="recall") private ArrayList<Recall> recalls;}从文档中:
XmlElementWrapper :围绕XML表示形式生成包装元素。它主要用于在集合周围产生包装XML元素。



