XStream: convert collection with attributes
问题 The XML I'm trying to convert looks like: <numberOfEmployees year="2013">499.0</numberOfEmployees> According to the XSD, there can be multiple of these tags, so it's a collection. The generated code looks like: protected List<NumberOfPersonnel> numberOfEmployees; When I use @XStreamImplicit , it drops the value, so I need a converter. But combining @XStreamImplicit with @XStreamConverter doesn't seem to work. So how do I do this? I've tried messing about with my own custom converter that