title: Xpath to read tags and attributes as String
body: <p>I have the following xml content that I would like to read everything inside ref as one string with xpath in dom4j api, basically 
  I want </p>
  
  <pre><code>&lt;list&gt;
    &lt;ref id="R1"&gt;
      &lt;citation type="book"&gt;
        &lt;name&gt;John&lt;/name&gt;
        &lt;title&gt;News&lt;/title&gt;
      &lt;/citation&gt;
    &lt;/ref&gt;
    &lt;ref id="R2"&gt;
      &lt;citation type="journal"&gt;
        &lt;name&gt;Jane&lt;/name&gt;
        &lt;title&gt;Finance&lt;/title&gt;
      &lt;/citation&gt;
    &lt;/ref&gt;
  &lt;/list&gt;
  </code></pre>
  
  <p>to output as raw strings including the tags, and attributes </p>
  
  <pre><code>&lt;citation type="book"&gt; &lt;name&gt;John&lt;/name&gt;&lt;title&gt;News&lt;/title&gt;&lt;/citation&gt; 
  &lt;citation type="journal"&gt; &lt;name&gt;Jane&lt;/name&gt;&lt;title&gt;Finance&lt;/title&gt;&lt;/citation&gt;
  </code></pre>
  
  <p>My code is</p>
  
  <pre><code>org.dom4j.Document doc = DomReader.parse("test.xml");
  List&lt;Node&gt; nodes = doc.selectNodes("/list/ref" );
  for (Node node : nodes)
  {
      System.out.println( node.getStringValue());
  }
  </code></pre>
  
  <p>The above code just gives me the values John, News, Jane, Finance.</p>
  
  <p>But I want the whole thing included.</p>