final ResourceDataInputSource input = new ResourceDataInputSource(data, manager);
return new DomResource(data.getKey(), db.parse(input), data.getVersion(manager));
}
catch (ParserConfigurationException e)
{
throw new ResourceCreationException("Unable to initialize the XML-Parser", e);
}
catch (SAXException e)
{
throw new ResourceCreationException("Unable to parse the document: " + data.getKey(), e);
}
catch (IOException e)
{
throw new ResourceLoadingException("Unable to read the stream from document: " + data.getKey(), e);
}