Description

Document document = DocumentHelper.parseText(transformed_content);

    // Dom4j automatically writes using UTF-8, unless otherwise specified.
    OutputFormat format = OutputFormat.createPrettyPrint();
    StringWriter outputWriter = new StringWriter();
    XMLWriter writer = new XMLWriter(outputWriter, format);
    writer.write(document);
    outputWriter.close();
    writer.close();
    return outputWriter.toString();         

Preview

Tags

Users

  • @jil

Comments and Reviews