title: JAXB - Java/ XMLValue & XMLElement conflict
body: <p>I have the next html, which I want to parse:</p>
  
  <pre><code>My input: 
  &lt;div&gt;
      &lt;span id="x1x1"&gt; bla bla &lt;/span&gt;
  &lt;/div&gt;
  &lt;span&gt;
      &lt;div&gt; bla bla &lt;/div&gt;
  &lt;/span&gt;
  
  My output in java:
      jaxbContext = JAXBContext.newInstance(Div.class);
      Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
      jaxbUnmarshaller.unmarshal(file);
      System.out.println("id " + div1.getSpan().get(0).get(id) + "value " + div1.getSpan().get(0).get(id))
      // should print: id = x1x1 value = bla bla
  </code></pre>
  
  <p>I have the next class:</p>
  
  <pre><code>public class Span
      List&lt;Div&gt; div;
  
      public List&lt;Div&gt; getDiv() {
          return div;
      }
  
      @XmlElement
      public void setDiv(List&lt;Div&gt; div) {
          for (int i = 0 ; i&lt;div.size(); i++){
              System.out.print("element")}
          this.div = div;
      }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>public class Div 
      List&lt;Span&gt; span = div1.get
  
      @XmlElement
      public void setSpan(List&lt;Span&gt; span) {
          for (int i = 0 ; i&lt;span.size(); i++){
              System.out.print("element")}
          this.span = span;
      }
  
      public List&lt;Button&gt; getSpan() {
          return span;
      }
  </code></pre>
  
  <p>Now, I want also the value of the span ("bla bla"). so I add to the class <code>Span</code>:</p>
  
  <pre><code>String value;
  
  public String getValue() {
      return value;
  }
  
  @XmlValue
  public void setValue(String value) {
      this.value = value;
  }
  </code></pre>
  
  <p>Bit it gives me the next error:</p>
  
  <pre><code> If a class has '@XmlElement' property, it cannot have '@XmlValue' property.
  </code></pre>
  
  <p>I try to use @XMLMixed, but without success. I would be happy for example with code example. Thanks.</p>