title: How to change name of element during JAXB classes generation
body: <p>I have mySchema.xsd file:`</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; elementFormDefault=&quot;qualified&quot; version=&quot;2.0&quot;&gt;
  &lt;xs:element name=&quot;A&quot; type=&quot;a&quot;/&gt;
  &lt;xs:element name=&quot;b&quot; type=&quot;b&quot;/&gt;
  &lt;xs:complexType name=&quot;a&quot;&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name=&quot;XXX&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:element name=&quot;Y&quot; type=&quot;xs:string&quot;/&gt;
          &lt;xs:element name=&quot;Z&quot; type=&quot;z&quot;/&gt;
          &lt;xs:element name=&quot;PERSON&quot;&gt;
              &lt;xs:complexType&gt;
                  &lt;xs:sequence&gt;
                      &lt;xs:element name=&quot;B&quot; type=&quot;b&quot; maxOccurs=&quot;unbounded&quot;/&gt;
                  &lt;/xs:sequence&gt;
              &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
      &lt;/xs:sequence&gt;
      &lt;xs:attribute name=&quot;xxx&quot; type=&quot;xs:string&quot;/&gt;
  &lt;/xs:complexType&gt;
  ....
  </code></pre>
  <p>During classes generation in cmd console</p>
  <pre><code>&quot;%java_home%\bin\xjc&quot; mySchema.xsd
  </code></pre>
  <p>i have error:</p>
  <pre><code>Exception in thread &quot;main&quot; java.lang.IllegalArgumentException: trying to create the same field twice: xxx
  </code></pre>
  <p>I realized that i have the same name in xs:element name=&quot;XXX&quot; and attribute name=&quot;xxx&quot;.
  I think i should create schemat_binding.xml file and change the name of the element XXX but i dont know how.</p>