*/
public static String toString(Element element, CharacterEncoder encoder) {
StringWriter writer = new StringWriter();
DOMDocumentOutputter outputter = new DOMDocumentOutputter(
new AnnotatingXMLDocumentWriter(writer), encoder);
try {
outputter.output(element);
} catch (IOException e) {
throw new RuntimeException(e);