|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] setEntityResolver() not setting entity resolver
Hi all. I'm working with JAXP and SAX2, trying to use a custom entity resolver, and failing. So far as I can tell, the resolver is not actually ever getting any calls to resolveEntity(), so I assume I'm not setting it properly and the parser doesn't know about it. I'm having trouble finding good documentation for how to go about this -- the doc I've mostly seen seems to refer to SAX1. What I'm doing is: import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; [...] SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXParser(); XMLReader xmlReader = parser.getXMLReader(); MyEntityResolver er = new MyEntityResolver(); xmlReader.setEntityResolver(er); parser.parse (new InputSource (...), handler); [...] (JDK 1.4.) I'd be very appreciative if someone could tell me what's going wrong. Thanks, Jessica
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








