Re: [Simple-support] Simple XML elementList question?
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2007-05-21 13:34:49
|
Hi, This is already implemented and is in the HEAD of the subversion repository. You can check it out with the following command: svn co https://svn.sourceforge.net/svnroot/simple/trunk/download/stream/ This will pass all test cases however it is still not finished so consider it beta code. The annotation you require is: @ElementList(inline=true) ArrayList<Book> books; Also, with the latest code if you don't specify the name you get the field name (i.e books), and if you don't specify the type you get the generic type if it is specified (i.e Book) so the above annotation will work as is. Niall ----- Original Message ---- From: Hrvoje Slavicek <hsl...@us...> To: ni...@us... Cc: hsl...@us... Sent: Monday, May 21, 2007 2:07:36 PM Subject: Simple XML elementList question? Message body follows: Hi, I found your Simple XML serialization framework and it is great piece of software. It saved me a lot of work. I have a question about element list I would like to do something like this I have 2 class @Root(name="book") Book{ .... } @Root(name="Library") class Library{ @Atribute(name="name") String name; @ElementList(?????????????) ArrayList<Book> books; } i would like to serialize Library to something like this <Library> <name>my lib</lib> <Book name="my book1"/> <Book name="my book2"/> <Book name="my book3"/> </Library> but I cant,I can get something like this <Library> <name>my lib</lib> <Books> <Book name="my book1"/> <Book name="my book2"/> <Book name="my book3"/> </Books> </Library> But I have XML Scheme specification which says what I have to have and that is example 1. Is there a way to achive this? Are there any plans to implement this feature in future? when can we expect this feature? Thank you very much, and keep doing good job. -- This message has been sent to you, a registered SourceForge.net user, by another site user, through the SourceForge.net site. This message has been delivered to your SourceForge.net mail alias. You may reply to this message using the "Reply" feature of your email client, or using the messaging facility of SourceForge.net at: https://sourceforge.net/sendmessage.php?touser=1346425 ____________________________________________________________________________________ Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ |