/** * Look for elements with the name <i>elementName</i> below <i>parent</i> and put them in to * <i>config</i> as a new map with the name <i>mapName</i>. * * @param parent The parent element to search for children * @param config The configuration to put the elements found * @param mapName The name of the map as a key to put into the config * @param elementName The elements to look for */ private static void bindMap( Element parent, Configuration config, String mapName, String elementName) { PropertyMap map = new PropertyMap(mapName); for (Object child : parent.getChildren(elementName)) { Element childElement = (Element) child; String name = childElement.getAttributeValue("name"); map.put(new PropertySimple(name, childElement.getText())); } config.put(map); }