title: parse string xml with JDOM
body: <p>I'm trying to parse string xml with JDOM but when I print it prints me blank. Do not print any data from my xml string.</p>
  
  <pre><code>    public static void main(String[] args) throws IOException {
  
      List resultado = null;
      resultado = new ArrayList&lt;&gt;();
      resultado = listarDatos();
      XStream xstream = new XStream();
      String xml = xstream.toXML(resultado);
  
      String adicionar = "&lt;?xml version = \"1.0\" encoding= \"UTF-8\"?&gt; \n";
      String doctype = "&lt;!DOCTYPE list \n&gt;";
      String xml_m = adicionar + doctype + xml.replace("&lt;newwebservicematerias.Materia&gt;", "&lt;ListaMaterias&gt;").replace("&lt;/newwebservicematerias.Materia&gt;", "&lt;/ListaMaterias&gt;");
      //System.out.println(xml_m);
  
      org.jdom.input.SAXBuilder saxBuilder = new SAXBuilder();
      try {
          org.jdom.Document doc = saxBuilder.build(new StringReader(xml_m));
          String message = doc.getRootElement().getText();
          System.out.println(message);
      } catch (JDOMException e) {
  // handle JDOMException
      } catch (IOException e) {
  // handle IOException
      }
  
  }
  </code></pre>
  
  <p>and tried with xerces and with jaxp but they throw me error.</p>