Have you tried parser.setEntityResolver(org.xml.sax.EntityResolver resolver)?
He was referring to the XNI XMLEntityResolver and not the SAX EntityResolver.
Richard Emberson wrote:
Is there an API for setting the XMLEntityResolver?
No, there isn't -- not on the DOMParser. We use the SAX "configurable" mechanism for most settings so that we can avoid the explosion of methods in the interfaces/ classes and to keep the whole framework as general as possible.
However, these methods appear on the XMLParserConfig- uration interface which is used internally by the DOM- Parser. We can't extend these out to the SAX and DOM parsers because they would conflict with the SAX versions and confuse users.
However, if you really want to use XMLEntityResolver, then you could create the parser configuration directly and set the entity resolver that way. Then you pick whatever API generating parser class you want to use with that parser configuration. Make sense? Here's an example:
XMLParserConfiguration config = new StandardParserConfiguration(); config.setEntityResolver(new MyXMLEntityResolver());
DOMParser parser = new DOMParser(config);
If you don't want to do this, then just stick with the property mechanism on the parser class.
-- Andy Clark * [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
