title: JAXB - element value field
body: <p>I have a class, that is something like this:</p>
  
  <pre><code>public class Property {
  
      private double floorArea;
  
      public double getFloorArea() {
          return floorArea;
      }
  
      @XmlElement
      public void setFloorArea(double floorArea) {
          this.floorArea = floorArea;
      }
  
  }
  </code></pre>
  
  <p>Which will give me something like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;property&gt;
      &lt;floorArea&gt;x&lt;/floorArea&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>But I need something like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;property&gt;
      &lt;floorArea&gt;
          &lt;value&gt;x&lt;/value&gt;
      &lt;/floorArea&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>The API I am using requires it this way. My limited JAXB knowledge is preventing me from figuring this out. Any help is appreciated.</p>
  
  <p>EDIT:</p>
  
  <p>something I am researching. Would I need to create a <code>value</code> class with its own JAXB annotations for this to work? (and set <code>floorArea</code> to the type of <code>value</code>)?</p>