title: SimpleXML: element with elements list or text
body: <p>I must parse a XML file that can be two types:</p>
  
  <pre><code>&lt;property&gt;
      &lt;value&gt;Some text&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;property&gt;
      &lt;value&gt;
          &lt;item id="first_id"/&gt;
          &lt;item id="second_id"/&gt;
          &lt;item id="third_id"/&gt;
      &lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>How can I do this with Java?</p>
  
  <p>I created a class:</p>
  
  <pre><code>@Root(strict = false)
  public class PropertyValue {
      @ElementList(inline = true, required = false)
      private List&lt;ItemData&gt; items;
  
      @Text(required = false)
      private String text;
  }
  </code></pre>
  
  <p><code>ItemData</code> is <code>item</code> class.</p>
  
  <p>But this does not work.
  The code gives me an exception: </p>
  
  <pre><code>org.simpleframework.xml.core.TextException: Text annotation @org.simpleframework.xml.Text(data=false, empty=, required=false) on field 'text' private java.lang.String PropertyValue.text used with elements in class PropertyValue
  </code></pre>