DocumentBuilderFactory
3940414243444546474849
private DOMTestUtil() {} public static void execute(Test test) throws Exception { try { test.execute(new DocumentBuilderFactoryImpl()); } catch (Throwable ex) { Assert.fail("Invalid test case; execution failed with standard DOM implementation: " + ex.getMessage()); } test.execute(new DOOMDocumentBuilderFactory());
25262728293031323334
import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl; public class XercesTest extends TestCase { public static TestSuite suite() { DocumentBuilderFactory dbf = new DocumentBuilderFactoryImpl(); dbf.setNamespaceAware(true); DOMTestSuiteBuilder builder = new DOMTestSuiteBuilder(dbf); return builder.build(); }