throw new NullPointerException();
if (xmlProvider == null)
xmlProvider = new JaxpXMLProvider();
InputStreamProvider provider = resolver.getProvider(sourceName);
Object cached = provider.getCachedResult();
if ((cached != null) && expectedType.isInstance(cached))
return cached;
TreeBuilder builder = new TreeBuilder(manager, expectedType);
InputStream stream = provider.openInputStream();
try
{
InputSource source = new InputSource(stream);
source.setSystemId(sourceName);
// Store a resolver relative to the file we're about to parse
setResolver(context, resolver.getResolver(sourceName));
setInputStreamProvider(context, provider);
// Step 6. Parse!
Object value = builder.parse(xmlProvider, source, context);
// Step 7. Store the cached result (if successful)
if (value != null)
provider.setCachedResult(value);
return value;
}
finally
{