Re: [Simple-support] Deserializing XML - @ElementList(entry="name", inline=true) - How to get the o
Brought to you by:
niallg
|
From: Jebarlin R. <jeb...@gm...> - 2011-09-02 06:35:45
|
Thank you Niall Gallaghe for your reply
I will try that ElementListUnion
If I found any difficulty, I will let u know ...
Thanks once again....
Regards,
Jebarlin
On Tue, Aug 30, 2011 at 4:59 PM, Niall Gallagher
<gal...@ya...>wrote:
> 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 1
> Science Book Name2
> Maths Book Name1
> Science Book Name3
> Maths 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...<http://mc/compose?to=...@li...>
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
--
Thanks & Regards,
Jebarlin Robertson.R
GSM: 91-9538106181.
|