builder.setErrorHandler(null);
return builder.parse(source);
}
catch (SAXException e)
{
throw new XMPException("XML parsing failure", XMPError.BADXML, e);
}
catch (ParserConfigurationException e)
{
throw new XMPException("XML Parser not correctly configured",
XMPError.UNKNOWN, e);
}
catch (IOException e)
{
throw new XMPException("Error reading the XML-file", XMPError.BADSTREAM, e);
}
}