Re: [Simple-support] Deserializing XML - @ElementList(entry="name", inline=true) - How to get the o
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-08-30 11:29:27
|
You need to use the ElementListUnion annotation, take a look at the tutorial, also, the test cases have many examples. e.g
@ElementListUnion({
@ElementList(entry="math", type=Math.class, inline=true),
@ElementList(entry="science", type=Science.class, inline=true)
})
--- On Tue, 30/8/11, Jebarlin Robertson <jeb...@gm...> wrote:
From: Jebarlin Robertson <jeb...@gm...>
Subject: [Simple-support] Deserializing XML - @ElementList(entry="name", inline=true) - How to get the order of the element one by one?
To: sim...@li...
Received: Tuesday, 30 August, 2011, 12:11 AM
Hi,
I am new to this Simple XML, but I am feeling this very easy to use this.
I have one problem. How can I get the order of the Element, if I have ElementList with "inline=true"?
ex:{ @ElementList(entry="name", inline=true) public List<Name> nameList;}
For Example I have the following XML
<Books> <Science>Science Book Name1</Science> <Science>Science Book Name2</Science> <Maths>Maths Book Name1</Maths> <Science>Science Book Name3</Science>
<Maths>Maths Book Name2</Maths></Books>
When I deserialize the xml, I am able to get the List of Science book and List of Maths book.
Can I get the Order of the Books Like this (Order of the Element one by one)?
Science Book Name 1Science Book Name2Maths Book Name1Science Book Name3Maths Book Name2
Can any one help me to solve this? and Is it possible to get the Order of Element one by one using Simple?
Thanks in Advance.
--
Thanks & Regards,
Jebarlin Robertson.R
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|