_parser = _parserFactory.newSAXParser();
URL resourceURL = resource.getResourceURL();
if (resourceURL == null)
throw new DocumentParseException(ParseMessages.missingResource(resource), resource,
null);
InputStream rawStream = resourceURL.openStream();
stream = new BufferedInputStream(rawStream);
_parser.parse(stream, this, resourceURL.toExternalForm());
stream.close();
stream = null;
success = true;
}
catch (SAXParseException ex)
{
_parser = null;
Location location = new LocationImpl(resource, ex.getLineNumber(), ex.getColumnNumber());
throw new DocumentParseException(ParseMessages.errorReadingResource(resource, ex),
location, ex);
}
catch (Exception ex)
{
_parser = null;
throw new DocumentParseException(ParseMessages.errorReadingResource(resource, ex),
resource, ex);
}
finally
{
if (!success)