private void loadTemplate(final IaasProvider iaas, final OMElement iaasElt) { Iterator<?> it = iaasElt.getChildrenWithName(new QName(CloudControllerConstants.IMAGE_ID_ELEMENT)); if (it.hasNext()) { OMElement imageElt = (OMElement) it.next(); iaas.setImage(imageElt.getText()); } if (it.hasNext()) { log.warn( xmlSource + " contains more than one " + CloudControllerConstants.IMAGE_ID_ELEMENT + " elements!" + " Elements other than the first will be neglected."); } }