title: any way to convert xml to object in java?
body: <p>I am trying to use a XML and access to all fields and data on an easy way, so, I decided to use JaxB , but I have no idea how to create all the classes for the objects, I tried manually like this.</p>
  
  <pre><code>@XmlRootElement(name = "Response")
  public class Response {
  
      @XmlElement(ns = "SignatureValue")
      String signatureValue;
  
  }
  </code></pre>
  
  <p>But I get an error on @XmlElement saying the annotation is disallowed for this location...</p>
  
  <p>I checked other posts and they work great if I have something like <strong>Hellw</strong> but doesnt work with more complex formats, an example of first part of mine is like this</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;DTE xsi:noNamespaceSchemaLocation="http://www.myurl/.xsd" xmlns:gs1="urn:ean.ucc:pay:2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  </code></pre>
  
  <p>
  
  <p>any idea how to do all this??</p>
  
  <p>Thanks in advance</p>
  
  <p>EDIT:</p>
  
  <p>I forgot to say, the XML is actually a String with the entire XML.</p>