private static void writeNodeContentToStreamWriter()

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


    private static void writeNodeContentToStreamWriter(
            ConfigurationNode configurationNode, XMLStreamWriter streamWriter) throws XMLStreamException {
        for (Map.Entry<String, String> attribute :
                configurationNode.getAttributes().entrySet()) {
            streamWriter.writeAttribute(attribute.getKey(), attribute.getValue());
        }
        for (ConfigurationNode child : configurationNode.getChildren()) {
            // Empty element with attributes
            if (child.getChildren().isEmpty()) {
                streamWriter.writeEmptyElement(LOG4J_NAMESPACE_URI, child.getPluginName());
                writeNodeContentToStreamWriter(child, streamWriter);
            } else {
                streamWriter.writeStartElement(LOG4J_NAMESPACE_URI, child.getPluginName());
                writeNodeContentToStreamWriter(child, streamWriter);
                streamWriter.writeEndElement();
            }
        }
    }