public ConfigurationNode parse()

in log4j-converter-config/src/main/java/org/apache/logging/converter/config/internal/v2/XmlConfigurationMapper.java [55:72]


    public ConfigurationNode parse(InputStream inputStream) throws IOException {
        DocumentBuilder documentBuilder = XmlUtils.createDocumentBuilderV2();
        try {
            Document document = documentBuilder.parse(inputStream);
            Element configurationElement = document.getDocumentElement();
            if (!isLog4jNamespace(configurationElement)) {
                throw new ConfigurationConverterException("Wrong configuration file namespace: expecting `"
                        + LOG4J_NAMESPACE_URI + "`, found `" + configurationElement.getNamespaceURI() + "`");
            }
            return parseComplexElement(configurationElement);
        } catch (SAXException e) {
            Throwable cause = e.getCause();
            if (cause instanceof IOException) {
                throw (IOException) cause;
            }
            throw new IOException("Unable to parse configuration file.", e);
        }
    }