while(iterator.hasNext()) buildConfigurationTree(builder, (ConfigurationTree)iterator.next());
while(iterator.hasNext()) { buffer = (ConfigurationTree)iterator.next(); if(buffer.hasNodes() || buffer.hasLeafs()) buildConfigurationTree(builder, buffer); }
    private static void buildConfigurationTree(ConfigurationTreeBuilder builder, ConfigurationTree node) {        Iterator          iterator;        ConfigurationLeaf leaf;        builder.addNode(node.getName());        iterator = node.getLeafs();        while(iterator.hasNext()) {            leaf = (ConfigurationLeaf)iterator.next();            builder.addLeaf(leaf.getName(), leaf.getValue());        }        iterator = node.getNodes();        while(iterator.hasNext())            buildConfigurationTree(builder, (ConfigurationTree)iterator.next());        builder.closeNode(node.getName());    }