The Xerces version that ships with Java has a bug when dealing with empty XML elements for XML version 1.1 input. This bug has long been fixed in Apache's Xerces release (since 2.6.2).
I want to create a XMLEventReader through the XMLInputFactory interface. Something like this:
XMLInputFactory.newFactory().createXMLEventReader(new FileInputStream(inputFile));
Simply placing the Xerces jars into the classpath does not seem to work here. In fact I do not see that Apaches Xerces release extends XMLInputFactory, which seems to be a prerequisite for creating an implementation-specific input factory.
Is there a way to force XMLInputFactory.newFactory to use Apaches Xerces release from the classpath?