Hi there,

You will need to create two Java classes:
 - Post class with a "name" String property
 - Posts class with a List<Post> property

Then, add the org.restlet.ext.xstream extension to your classpath and that
should be it.

For the Restlet resources, use annotations and ServerResource subclasses as
explained here:
http://wiki.restlet.org/docs_2.0/13-restlet/181-restlet/303-restlet.html

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com


-----Message d'origine-----
De : [email protected] [mailto:[email protected]] 
Envoyé : samedi 20 février 2010 10:21
À : [email protected]
Objet : XStream

Hi,

I want to map the following xml to a Java list with Post objects, where Post
should be an XStream annotated POJO:

<posts>
  <post name="foo"/>
  <post name="bar"/>
</posts>

Any hints how to do it?

Thanks.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24494
99

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2450049
  • XStream webpost
    • RE: XStream Jerome Louvel

Reply via email to