public static Element getRootElementFrom(final InputStream metadataResource, final OpenSamlConfigBean configBean) {
        return FunctionUtils.doUnchecked(() -> {
            try (metadataResource) {
                val document = configBean.getParserPool().parse(metadataResource);
                return document.getDocumentElement();
            }
        });
    }
Gets root element from resource.

@param metadataResource the metadata resource
@param configBean       the config bean
@return the root element from
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/SamlUtils.java