SimpleXML中当你使用 @ElementList注解生成的xml会带有class属性
@ElementList(name = "elements", entry = "element") protected List<Element> elements;
<elements class="java.util.ArrayList"> <element> ....... </element> </elements>
移除class属性有两种方法:
1、类型设置为ArrayList
2、@Path("elements")
@ElementList(entry = "element",inline=true)
引用自:https://stackoverflow.com/questions/12113025/remove-class-attribute