/** * try to find the profile node within <egl:format_profiles>, whose name is profileName * * @param profileName * @param formatprofiles * @return - null if not found */ public static Profile findProfileByName(String profileName, FormatProfiles formatprofiles) { EList profiles = formatprofiles.getProfile(); for (Iterator it = profiles.iterator(); it.hasNext(); ) { Profile profile = (Profile) it.next(); if (profileName.equals(profile.getName())) { return profile; } } return null; }