return getDocumentBuilder().parse(inputStream);
} else if (uri != null) {
return getDocumentBuilder().parse(uri);
}
} catch (SAXException e) {
throw new JRException("Failed to parse the xml document", e);
} catch (IOException e) {
throw new JRException("Failed to parse the xml document", e);
}
return null;
}