DocumentBuilderFactoryBuilder { public DocumentBuilder newDocumentBuilder(DocumentBuilderFactory f) throws ParserConfigurationException { return configure(configure(f).newDocumentBuilder()); } DocumentBuilderFactoryBuilder(); static final DocumentBuilderFactoryBuilder newInstance(); static final DocumentBuilderFactoryBuilder newRestrictedInstance(); static final DocumentBuilderFactoryBuilder newInstanceIfNull(DocumentBuilderFactoryBuilder b); static final DocumentBuilderFactoryBuilder newRestrictedInstanceIfNull(DocumentBuilderFactoryBuilder b); static final DocumentBuilderFactoryBuilder newInstanceIfNull(DocumentBuilderFactoryBuilder b, NamespaceContext ctx); DocumentBuilderFactory configure(DocumentBuilderFactory f); DocumentBuilder configure(DocumentBuilder db); DocumentBuilder newDocumentBuilder(DocumentBuilderFactory f); DocumentBuilderFactory build(); DocumentBuilderFactoryBuilder withFeatures(Map<String, Boolean> f); DocumentBuilderFactoryBuilder withFeatures(KeyValuePairSet v); DocumentBuilderFactoryBuilder addFeature(String featureName, Boolean value); DocumentBuilderFactoryBuilder withValidating(Boolean b); DocumentBuilderFactoryBuilder withNamespaceAware(Boolean b); DocumentBuilderFactoryBuilder withNamespaceAware(NamespaceContext b); DocumentBuilderFactoryBuilder withIgnoreWhitespace(Boolean b); DocumentBuilderFactoryBuilder withExpandEntityReferences(Boolean b); DocumentBuilderFactoryBuilder withIgnoreComments(Boolean b); DocumentBuilderFactoryBuilder withCoalescing(Boolean b); DocumentBuilderFactoryBuilder withXIncludeAware(Boolean b); DocumentBuilderFactoryBuilder withEntityResolver(EntityResolver e); static final String DISABLE_DOCTYP; }
@Test public void testNewDocumentBuilder() throws Exception { DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); DocumentBuilderFactoryBuilder builder = DocumentBuilderFactoryBuilder.newInstance().withCoalescing(true) .withEntityResolver(new Resolver()).withExpandEntityReferences(true).withIgnoreComments(true).withIgnoreWhitespace(true) .withNamespaceAware(true).withValidating(true).withXIncludeAware(true); assertNotNull(builder.newDocumentBuilder(f)); }