private static void formatTo()

in log4j-converter-config/src/main/java/org/apache/logging/converter/config/internal/ComponentUtils.java [132:151]


        private static void formatTo(ConfigurationNode node, StringBuilder builder, int indent) {
            String indentation = getIndentation(indent);
            builder.append(indentation).append("<").append(node.getPluginName());
            for (final Map.Entry<String, String> entry : node.getAttributes().entrySet()) {
                builder.append(" ")
                        .append(entry.getKey())
                        .append("=\"")
                        .append(entry.getValue())
                        .append("\"");
            }
            builder.append(">\n");
            for (ConfigurationNode child : node.getChildren()) {
                formatTo(child, builder, indent + 1);
                builder.append('\n');
            }
            builder.append(indentation)
                    .append("</")
                    .append(node.getPluginName())
                    .append(">");
        }