DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
DOMImplementation impl = registry.getDOMImplementation("Core 3.0");
d = impl.createDocument(null, null, null);
DOMImplementationLS implLS = (DOMImplementationLS) impl.getFeature("LS",
"3.0");
output = implLS.createLSOutput();
output.setCharacterStream(out);
serializer = implLS.createLSSerializer();
} catch (ClassNotFoundException e) {
logger.log(TreeLogger.ERROR, "Could not create document", e);
throw new UnableToCompleteException();