if (node instanceof Element) {
serial.serialize((Element) node);
} else if (node instanceof Document) {
serial.serialize((Document) node);
} else {
serial.serialize((DocumentFragment) node);
}
return stringOut.toString();
} catch (java.io.IOException ioe) {
throw new IOErrorRuntimeException("Strange error. IOException occurred where it cannot!", ioe);
}