String (final Element element, final String attributeName) { final String value = getString(element, attributeName); if(value != null){ return value; } else{ throw new IllegalArgumentException("attribute '" + attributeName + "' is required: "+element); } }