title: Need to access multiple @XmlRootElement in a XML - Spring Batch
body: <p>Let's say I have an XML below</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;results application="web" hostname="WIN"&gt;
      &lt;test-node&gt;
          &lt;element&gt;1&lt;/element&gt;
      &lt;/test-node&gt;
      &lt;node1 browser="chrome"&gt;
          &lt;element2&gt;2&lt;/element2&gt;
      &lt;/node1&gt;
  &lt;/results&gt;
  </code></pre>
  
  <p>I want to write most of the attributes in this XML to a MySql Database using Spring Batch. So I created a class that looks like below</p>
  
  <pre><code>@XmlRootElement(name = "results")
  public class LowLevelSuiteFields {
  
  private String application;
  private String hostName;
  
  @XmlAttribute(name = "application")
  public String getApplication() {
      return application;
  }
  
  public void setApplication(String application) {
      this.application = application;
  }
  
  @XmlAttribute(name = "hostname")
  public String getHostName() {
      return hostName;
  }
  
  public void setHostName(String hostName) {
      this.hostName = hostName;
  }
  
  }
  </code></pre>
  
  <p>The question is I also want to access the attribute <code>browser</code> in <code>node1</code>. I can't have another <code>@XmlRootElement(name = "node1")</code> and then do a <code>@XmlAttribute(name = "browser")</code></p>
  
  <p>The reason is I'm only creating one <code>PreparedStatementSetter</code> that implements <code>ItemPreparedStatementSetter&lt;LowLevelSuiteFields&gt;</code>... So I can't create another class just for another <code>XmlRootElement</code></p>
  
  <p>Pls help.</p>