I've an xml with a repeating array element, how do I deserialize it?
<root>
<values>
<val1>afa</val1>
<val2>asgfasg</val2>
</values>
<values>
<val1>hkjvlk</val1>
<val2>sdsdgsdg</val2>
</values>
...
</root>
XStream xstream = new XStream(new DomDriver());
xstream.alias("values", Inventory.class);
InventoryResult inventory = (InventoryResult) xstream.fromXML(data.toString());
&
public class InventoryResult {
private Inventory values;
}
I've tried List, Inventory[], but none of them work.