title: How to get xml attribute using JAXB
body: <p>this is my xml:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
      &lt;organization&gt;
        &lt;bank&gt;
          &lt;description&gt;aaa&lt;/description&gt;
          &lt;externalkey&gt;123&lt;/externalkey&gt;
          &lt;property name="pName" value="1234567890" /&gt;
        &lt;/bank&gt;
     &lt;/organization&gt;
  </code></pre>
  
  <p>I used JAXB and unmarshall for this xml and I can get description and externalkey. But I cannot get property name with value.</p>
  
  <ul>
  <li><p>This is my java class for unmarshall:</p>
  
  <pre><code>JAXBContext jb = JAXBContext.newInstance(Organization.class);
  Unmarshaller um = jb.createUnmarshaller();
  Organization org = (Organization) um.unmarshal(new File("\\upload\\bank999999.xml"));
  System.out.println(org.getBank().getDescription());
  System.out.println(org.getBank().getExternalkey());
  </code></pre></li>
  <li><p>Organization.java</p>
  
  <pre><code>@XmlRootElement
  public class Organization {
  Bank bank = new Bank();
  
  public Bank getBank() {
    return bank;
  }
  
  public void setBank(Bank bank) {
   this.bank = bank;
  }
  }
  </code></pre></li>
  <li><p>Bank.java</p>
  
  <pre><code>@XmlRootElement
  public class Bank {
   private String description;
   private String externalkey;
   private String property;
  
  //..GETTER and SETTER
  }
  </code></pre>
  
  <p>How can I get property name and value? Thank u</p></li>
  </ul>