views:

200

answers:

0

Hi,

I'm new to restlet and quite confused. A rest server returns the following xml response:

<posts user="a" dt="2010-01-21T08:00:00Z" tag="">
  <post href="http://www.opensatnav.org/" hash="a" description="OpenSatNav" tag="android   osm" time="2010-01-21T20:55:54Z" extended=""/>
  <post href="http://www.openrouteservice.org/" hash="a" description="OpenRouteService" tag="routing" time="2010-01-21T20:55:24Z" extended=""/>
</posts>

How do I use xstream to turn that xml stream into a Java list with Post objects? I know that I could use a DOMRepresentation, but I want to use xstream instead.

Thanks.