[Simple-support] Problem with deserializing complex types (several lists)
Brought to you by:
niallg
|
From: Alex C. <Ale...@so...> - 2011-04-29 09:45:17
|
Hello,
first of all, thanks for the great framework!
In your samples you did not specify the case like this:
-------------------------- properties.xml ------------------
<?xml version="1.0" encoding="UTF-8"?>
<propertyList>
<name>example1</name>
<name>example2</name>
<name>example3</name>
<entry key="one">
<value>first value</value>
</entry>
<entry key="two">
<value>second value</value>
</entry>
<entry key="three">
<value>third value</value>
</entry>
</propertyList>
-----------------------------------------------------
the case is I need to dig thru two lists within one parent element - how this can be done?
the code below is not working (neither with inline=true or not)
------------------------ Entry.java -------------------
@Root
public class Entry {
@Attribute
protected String key;
@Element
protected String value;
public String getKey() {
return key;
}
}
// ------------------------ PropertyList.java -------------------
@Root
public class PropertyList {
@ElementList(inline=true)
private List<String> name;
@ElementList(inline=true)
private List<Entry> list;
public List<String> getName() {
return name;
}
public List getList() {
return list;
}
}
thanks in advance!
Alex.
|