title: convert xml to java object using jaxb (unmarshal)
body: <p>I have the following XML and I need to convert it into a java object.</p>
  
  <pre><code>&lt;tests&gt;
      &lt;test-data&gt; 
           &lt;title&gt;BookTitle&lt;/title&gt; 
           &lt;book&gt;BookName&lt;/book&gt; 
           &lt;count&gt;64018&lt;/count&gt; 
           &lt;test-data&gt; 
              &lt;title&gt;Book title1&lt;/title&gt; 
              &lt;book&gt;Book Name1&lt;/book&gt; 
              &lt;count&gt;5&lt;/count&gt; 
           &lt;/test-data&gt; 
           &lt;test-data&gt; 
              &lt;title&gt;Book title2&lt;/title&gt; 
              &lt;book&gt;Book Name3&lt;/book&gt; 
              &lt;count&gt;5&lt;/count&gt; 
           &lt;/test-data&gt; 
           &lt;test-data&gt; 
              &lt;title&gt;Book title3&lt;/title&gt; 
              &lt;book&gt;Book Name3&lt;/book&gt; 
              &lt;count&gt;4&lt;/count&gt; 
           &lt;/test-data&gt; 
      &lt;/test-data&gt;
  &lt;/tests&gt;
  </code></pre>
  
  <p>I am not sure what will be my pojo when I use JAXB to convert it.</p>
  
  <p>I created the following POJOs as per my understanding:</p>
  
  <pre><code>public class Tests {
  
      TestData testData;
  
      public TestData getTestData() {
          return testData;
      }
  
      public void setTestData(TestData testData) {
          this.testData = testData;
      }
  }
  
  public class TestData {
      String title;
      String book;
      String count;
  
      public String getTitle() {
          return title;
      }
      public void setTitle(String title) {
          this.title = title;
      }
      public String getBook() {
          return book;
      }
      public void setBook(String book) {
          this.book = book;
      }
      public String getCount() {
          return count;
      }
      public void setCount(String count) {
          this.count = count;
      }
  }
  </code></pre>
  
  <p>Please help me.
  Thanks in advance.</p>