factory.setValidating(true);
try
{
DocumentBuilder builder = factory.newDocumentBuilder();
builder.setErrorHandler(this);
builder.setEntityResolver(new XHtmlEntityResolver());
return builder;
}
catch(ParserConfigurationException pce)
{
throw new RuntimeException(pce);