title: Parsing a RESTful XML response and displaying in JTable
body: <p>My web service is working and I can print out the XML retrieved by the Service with my code below:</p>
  
  <pre><code>resource = client.resource("http://localhost:8080/testProject/rest/items");
  ClientResponse response= resource.get(ClientResponse.class);
  String entity = response.getEntity(String.class);
  System.out.println(entity);
  </code></pre>
  
  <p>However I'm trying to now use this XML to be the data provider for a JTable, and I can't work out how to parse it. My code is below but won't work because "entity" is a string.</p>
  
  <pre><code>    JAXBContext context = JAXBContext.newInstance(Item.class);
      Unmarshaller um = context.createUnmarshaller();
      Item item = (Item) um.unmarshal(entity);
  </code></pre>
  
  <p>So my question(s) are </p>
  
  <p>What am I doing wrong here? </p>
  
  <p>Should I not be using .getEntity(String.Class) to do this?</p>
  
  <p>Is there an easier way to get this XML response into a JTable?</p>
  
  <p>Thanks</p>