Search in sources :

Example 6 with Serializer

use of nu.xom.Serializer in project tetrad by cmu-phil.

the class TestSemXml method printDocument.

private static void printDocument(Document document) {
    Serializer serializer = new Serializer(System.out);
    serializer.setLineSeparator("\n");
    serializer.setIndent(2);
    try {
        serializer.write(document);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}
Also used : IOException(java.io.IOException) Serializer(nu.xom.Serializer)

Aggregations

IOException (java.io.IOException)6 Serializer (nu.xom.Serializer)6 Document (nu.xom.Document)3 FileOutputStream (java.io.FileOutputStream)2 OutputStream (java.io.OutputStream)2 Element (nu.xom.Element)2 BayesIm (edu.cmu.tetrad.bayes.BayesIm)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 File (java.io.File)1 ArrayList (java.util.ArrayList)1 Attribute (nu.xom.Attribute)1