title: How to configure XSD to map XML to POJO with different name
body: <p>We have a requirement where XML tags are not similar to java POJO attributes. </p>
  
  <p>We need a solution to map XML tags to POJO with different name. </p>
  
  <p>Here is the same XML,</p>
  
  <pre><code>&lt;RES&gt;
       &lt;TAG1&gt;
         value
       &lt;/TAG1&gt;
  &lt;/RES&gt;
  </code></pre>
  
  <p>Here is the POJO class,</p>
  
  <pre><code>public class Response {
      protected String tag1Value;
  ...}
  </code></pre>
  
  <p>Here I want to map  to tag1Value in POJO.</p>
  
  <p>I have found below syntax can be used to map XML to java attributes.</p>
  
  <pre><code>public class Response {
       @XmlElement(name="TAG1")
      protected String tag1Value;
  ...}
  </code></pre>
  
  <p>But I want to know how to configure this in XSD, so that POJO can be generated with name attribute in XMLElement.</p>
  
  <p>With the below XSD how to specify java attribute name and XML nae together,</p>
  
  <pre><code>&lt;xsd:element name="tag1Value" minOccurs="0" maxOccurs="1"&gt;
  </code></pre>
  
  <p>Help appreciated...</p>