writer, styleAttributeName);
DOMDocumentOutputter outputter = new DOMDocumentOutputter(
documentWriter, new DebugCharacterEncoder());
try {
outputter.output(document);
} catch (IOException e) {
throw new RuntimeException(e);
}
return writer.toString();
}