[Simple-support] Deserializing XML - @ElementList(entry="name", inline=true) - How to get the order
Brought to you by:
niallg
|
From: Jebarlin R. <jeb...@gm...> - 2011-08-30 07:11:35
|
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
|