title: How to retrieve an Element mixed children as text (JDOM)
body: <p>I have an XML like the following:</p>
  
  <pre><code>&lt;documentation&gt;
      This value must be &lt;i&gt;bigger&lt;/i&gt; than the other.
  &lt;/documentation&gt;
  </code></pre>
  
  <p>Using JDOM, I can get the following text structures:</p>
  
  <pre><code>Document d = new SAXBuilder().build( new StringReader( s ) );
  System.out.printf( "getText:          '%s'%n", d.getRootElement().getText() );
  System.out.printf( "getTextNormalize: '%s'%n", d.getRootElement().getTextNormalize() );
  System.out.printf( "getTextTrim:      '%s'%n", d.getRootElement().getTextTrim() );
  System.out.printf( "getValue:         '%s'%n", d.getRootElement().getValue() );
  </code></pre>
  
  <p>which give me the following outputs:</p>
  
  <pre><code>getText:          '
      This value must be  than the other.
  '
  getTextNormalize: 'This value must be than the other.'
  getTextTrim:      'This value must be  than the other.'
  getValue:         '
      This value must be bigger than the other.
  '
  </code></pre>
  
  <p>What I really wanted was to get the content of the element as a string, namely, <code>"This value must be &lt;i&gt;bigger&lt;/i&gt; than the other."</code>. <code>getValue()</code> comes close but removes the <code>&lt;i&gt;</code> tag. I guess I wanted something like <code>innerHTML</code> for XML documents...</p>
  
  <p>Should I just use an XMLOutputter on the contents? Or is there a better alternative?</p>