Hi Elliotte,
That was exactly the problem.
By using XMLReaderFactory instead of SAXParserFactory/SAXParser everything is working now. I also switched the setFeature call to be on the XMLReader object now.
I think what I did was look at xercesImpl.jar and opened META-INF/services/javax.xml.parsers.SAXParserFactory, which said the class was org.apache.xerces.jaxp.SAXParserFactoryImpl. So I worked from those interfaces and classes.
Thanks for pointing out the correct way of handling this.
Thanks, Matt
Elliotte Rusty Harold wrote:
You forgot to make your SAXParserFactory namespace aware, but don't bother. Use XMLReaderFactory instead. SAXParserFactory is a designed for SAX1. It does not work properly with SAX2, as your example shows.