title: Convert a raw XML string into a list of java objects?
body: <p>Ok - I know this should be totally easy - but for some reason - I can't get it to work!</p>
  
  <p>lets say I have the following POJO : </p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlRootElement
  public class PlainOldJavaObject implements Serializable {
  
      private long uuid;
      private String name;
  
      public PlainOldJavaObject() {
      }
  
      public long getUuid() {
          return this.uuid;
      }
  
      public void setUuid(long uuid) {
          this.uuid = uuid;
      }
  
      public String getNamen() {
          return this.name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      /* Omitted HashCode &amp; Equals for brevity. */
  }
  </code></pre>
  
  <p>And lets say I have the following xml (I've formatted it for readabilty - really I get it as a raw, unformatted string) : </p>
  
  <pre><code>&lt;PlainOldJavaObjects&gt;
      &lt;PlainOldJavaObject&gt;
          &lt;uuid&gt;8119&lt;/uuid&gt;
          &lt;name&gt;Jimmy&lt;/name&gt;
      &lt;/PlainOldJavaObject&gt;
      &lt;PlainOldJavaObject&gt;
          &lt;uuid&gt;2372&lt;/uuid&gt;
          &lt;name&gt;Johns&lt;/name&gt;
      &lt;/PlainOldJavaObject&gt;
  &lt;/PlainOldJavaObjects&gt;
  </code></pre>
  
  <p>How in the living hell do I turn that XML into a List instance?</p>
  
  <p>I tried using XStream - as follows : </p>
  
  <pre><code>XStream xStream = new XStream();
  List&lt;PlainOldJavaObject&gt; endResultHopefully = (List&lt;PlainOldJavaObject&gt;) xStream.fromXML(result);
  </code></pre>
  
  <p>But all that does is seemingly print the following to my terminal...</p>
  
  <pre><code>PlainOldJavaObjects : PlainOldJavaObjects
  </code></pre>
  
  <p>What the hell am I doing wrong here?</p>
  
  <p>NOTE : ADDING JAXB TAG BECAUSE FROM GOOGLING THIS - I SEE THAT THIS EXISTS, AND I WOULD ASSUME IT MIGHT BE WHAT I WANT - BUT I AM NOT SURE, MAYBE SOMEONE OVER IN THAT COMMUNITY MIGHT HAVE SOME GUIDANCE FOR ME ALSO?</p>