Document doc = null;
try {
parser = (DOMParser) manager.lookup(DOMParser.ROLE);
InputSource is = new InputSource(source.getInputStream());
is.setSystemId(source.getURI());
doc = parser.parseDocument(is);
} catch (SAXException se) {
getLogger().error(source.getURI() + " is not a valid XML file");
} catch (IOException ioe) {
getLogger().error("Could not read file", ioe);
} catch (ServiceException ce) {