builder.endElement();
builder.endDocument();
builder.close();
DocumentImpl newRoot = (DocumentImpl)builder.getCurrentRoot();
newRoot.graftLocationMap(oldRoot);
return newRoot;
} catch (XPathException err) {
//TransformerConfigurationException e = new TransformerConfigurationException(err);
err.setLocator(this);
throw err;