Document doc = parser.parse(new ByteArrayInputStream("\n".getBytes("ISO-8859-1")), "ISO-8859-1", "csv");
StringWriter sw1 = new StringWriter();
StringWriter sw2 = new StringWriter();
CSVWriter w1 = new CSVWriter(sw1, ',');
CSVWriter w2 = new CSVWriter(sw2, ';');
Parser.convertDOMToCSV(doc, new AbstractCSVWriter[] { w1, w2 });
Parser parser2 = buildParser("BLOCK row\r\n" +
"SET �/cell� And another row\r\n" +
"ENDBLOCK\r\n" +
"ML\r\n");
parser2.parseToCSV("\n", w2);
w1.close();
w2.close();
Assert.assertEquals("\"Last Name\",\"First Name\"\r\n\"Adams\",\"Douglas\"\r\n", sw1.toString());
Assert.assertEquals("\"\";\"This is for the second file\"\r\n\"And another row\"\r\n", sw2.toString());
}