title: How to parse an XML with only root element
body: <p>I need to annotate a class for unmarshalling an XML like this:</p>
  
  <pre><code>&lt;element&gt;data&lt;/element&gt;
  </code></pre>
  
  <p>And I don't know how to do it because the class has to be annotated with <code>@XmlRootElement</code> but I need to get the root element value. I know this doesn't work but it's what I have done:</p>
  
  <pre><code>@XmlRootElement(name = "element")
  public Class MyClass{
  
  @XmlElement(name = "element")
  protected String elementValue;
  public String getElementValue(){...}
  public void setElementValue(String el){...}
  </code></pre>
  
  <p>Is there any possibility to get this?</p>