Re: [Simple-support] Problem with deserializing complex types (several lists)
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-04-29 11:56:08
|
Hi,
This looks like it should work. Is there any error here?
--- On Fri, 29/4/11, Alex Chuprinin <Ale...@so...> wrote:
From: Alex Chuprinin <Ale...@so...>
Subject: [Simple-support] Problem with deserializing complex types (several lists)
To: "sim...@li..." <sim...@li...>
Received: Friday, 29 April, 2011, 2:31 AM
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.
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|