title: Map Jackson XML attribute to corresponding JSON element
body: <p>I am using Jackson XmlMapper to deserialize XML to POJO.
  Then I am using ObjectMapper to serialize this to JSON.</p>
  
  <p>I'd like to set a JSON key value by using an XML attribute value. Any help would be appreciated. Thanks.</p>
  
  <p>Example XML:</p>
  
  <pre><code>&lt;response&gt;
    &lt;label data="someValue" /&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>needs to map to JSON as: </p>
  
  <pre><code>{
    "response" : {
     "label" : "someValue"
     }
  }
  </code></pre>
  
  <p>This is what I can get right now:</p>
  
  <pre><code>{
    "response" : {
      "label" : {
        "data" : "someValue"
      }
    }
  }
  </code></pre>
  
  <p>This is my POJO for the label element:</p>
  
  <pre><code>@JsonIgnoreProperties(ignoreUnknown=true)
  public class LabelObject {
  
    @JacksonXmlProperty(localName = "data", isAttribute = true)
    private String data;
  
    // getter setter
  }
  </code></pre>