[
Lists Home |
Date Index |
Thread Index
]
- From: jmbolles@ThoughtWorks.com
- To: xml-dev@xml.org
- Date: Sun, 14 May 2000 22:26:03 -0500
If null is a valid and expected return value, why would
XMLReader.setEntityResolver throw a NullPointerException if you tried to
set the ER to null? How would I reset it to the XMLReader's own default
resolution?
A workaround might have been:
EntityResolver defaultResolver = xmlReader.getEntityResolver();
xmlReader.setEntityResolver(specialCaseResolver);
//do stuff
xmlReader.setEntityResolver(defaultResolver);
but the defaultResolver would be null if the internal default is being
used. If the internal default is considered registered, then
getEntityResolver () could never return null. Right?
Regards,
Jack
>From XMLReader:
/**
* Allow an application to register an entity resolver.
*
* <p>If the application does not register an entity resolver,
* the XMLReader will perform its own default resolution.</p>
*
* <p>Applications may register a new or different resolver in the
* middle of a parse, and the SAX parser must begin using the new
* resolver immediately.</p>
*
* @param resolver The entity resolver.
* @exception java.lang.NullPointerException If the resolver
* argument is null.
* @see #getEntityResolver
*/
public void setEntityResolver (EntityResolver resolver);
/**
* Return the current entity resolver.
*
* @return The current entity resolver, or null if none
* has been registered.
* @see #setEntityResolver
*/
public EntityResolver getEntityResolver ();
***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************
|