I am using xstream and trying to serialize a List to XML. I need an output structure like
<Employees>
<Employee></Employee>
<Employee></Employee>
<Employee></Employee>
</Employees>
The object to serialize would be something like an
List<Employee>
or a class Employees. I've tried to create an Employees as
public class Employees extends ArrayList<Employee>(){}
and various other approaches but can't get it to serialize as I need it. Is there an easy way to do such a thing?
My question is similar to XStream - Root as a collection of objects but I'd like to do it without a wrapper object.