List of usage examples for javax.xml.parsers DocumentBuilder setEntityResolver
public abstract void setEntityResolver(EntityResolver er);
From source file:tkwatch.Utilities.java
/** * Gets a working instance of a document builder. * /*from www . ja va 2 s . co m*/ * @return The document builder instance. * @throws ParserConfigurationException */ public static final DocumentBuilder getDocumentBuilder() throws ParserConfigurationException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setValidating(false); dbf.setIgnoringComments(false); dbf.setIgnoringElementContentWhitespace(true); dbf.setNamespaceAware(true); DocumentBuilder builder = dbf.newDocumentBuilder(); builder.setEntityResolver(new NullResolver()); return builder; }