XStream and parse xml attributes
问题 I have some xml that looks like: <document> <item name="id">some value</item> <item name="first-name">some value</item> <item name="last-name">some value</item> <item name="address">some value</item> <item name="zip">some value</item> </document> POJO: @XStreamAlias("document") public class Doc{ private String id; private String firstName; private String lastName; private String address; private String zip; } EDIT: The issue I am facing is that there are duplicate <item> tags causing xstream