public void write(final Writer output, final Map<String,Object> options, final Model model) throws IOException {
assert output != null;
assert model != null;
StringWriter buff = new StringWriter();
DefaultModelWriter writer = new DefaultModelWriter();
writer.write(buff, options, model);
Dom2Groovy converter = new Dom2Groovy(new IndentPrinter(new PrintWriter(output), " "));
try {
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();