The easiest way is to simply create the instance you want - there is no need to use XMLInputFactory.newInstance(); for Woodstox you will create an instance com.ctc.wstx.stax.WstxInputFactory. For Sun's implementation, this is something else (com.sun.sjsxp or such) - you can see the class name if you create an instance through the Stax API when the Woodstox piece is not in the classpath.
, "javax.xml.stream.XMLInputFactory", javadocs: value - .