All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.societegenerale.cidroid.extensions.actionToReplicate.XMLUtils Maven / Gradle / Ivy

There is a newer version: 1.0.10
Show newest version
package com.societegenerale.cidroid.extensions.actionToReplicate;

import org.dom4j.Document;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;

import java.io.IOException;
import java.io.StringWriter;

public class XMLUtils {

    public static String prettyPrint(Document originalDocument) throws IOException {

        StringWriter sw = new StringWriter();

        OutputFormat format = OutputFormat.createPrettyPrint();
        XMLWriter writer = new XMLWriter(sw, format);
        writer.write(originalDocument);

        return sw.toString();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy