List of usage examples for javax.xml.stream XMLInputFactory newFactory
public static XMLInputFactory newFactory(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError
From source file:com.cedarsoft.serialization.test.performance.XmlParserPerformance.java
public void benchJava() { runBenchmark(new Runnable() { @Override//from w w w. j a v a 2 s . c om public void run() { try { // XMLInputFactory inputFactory = XMLInputFactory.newInstance( "StAXInputFactory", getClass().getClassLoader() ); // XMLInputFactory inputFactory = XMLInputFactory.newFactory( "com.sun.xml.internal.stream.XMLInputFactoryImpl", getClass().getClassLoader() ); XMLInputFactory inputFactory = XMLInputFactory.newFactory( "com.sun.xml.internal.stream.XMLInputFactoryImpl", getClass().getClassLoader()); benchParse(inputFactory, CONTENT_SAMPLE); } catch (Exception e) { throw new RuntimeException(e); } } }, 4); }