Re: [Simple-support] flattening structure xml support
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-05-05 10:31:10
|
annotate the list with @ElementList(inline=true) this will flatten the list
--- On Tue, 3/5/11, jo desmet <jd...@gm...> wrote:
From: jo desmet <jd...@gm...>
Subject: [Simple-support] flattening structure xml support
To: Sim...@li...
Received: Tuesday, 3 May, 2011, 4:38 AM
Hi,
I need to marshal/unmarsal a structure in a "flattened way", a simplified example stating the concept is below.The exact structure can be slightly different, the critical point is that all nested objects should become on the global level.
Can anyone tell me if and how this is possible ?
thx in advance,
Jo
public class Example { private String name;
private List<SubItem> items;}
public class SubItem { private integer id;}
all subitems should be on the root level, so this should be represented as :
<root> <example id="1"> <name>Test</name> </example> <subItem id="1"> <id>2</id>
<parent ref="1" type="example"/> </subItem> <subItem id="2"> <id>4</id> <parent ref="1" type="example"/>
</subItem></root>
-----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
|