spf.setNamespaceAware(true);
spf.setValidating(false);
XMLReader xr = spf.newSAXParser().getXMLReader();
xr.setEntityResolver(pReader.getEntityResolver());
xr.setErrorHandler(pReader.getErrorHandler());
DOMBuilder db = new DOMBuilder();
db.setPrefixMappingIsAttribute(true);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
dbf.setNamespaceAware(true);
Document doc = dbf.newDocumentBuilder().newDocument();
db.setDocument(doc);
db.setTarget(doc);
xr.setContentHandler(db);
xr.parse(pSource);
return doc;
}