Map<Locale,Properties> bundles = new HashMap<Locale, Properties>();
if (xmlFile != null && xmlFile.exists()) {
ImportResults importResults = importManager.parse(new FileInputStream(xmlFile));
// Check parsing results.
MessageList messages = importResults.getMessages();
Locale locale = LocaleManager.currentLocale();
Iterator it = messages.iterator();
while (it.hasNext()) {
Message message = (Message) it.next();
switch (message.getMessageType()) {
case Message.ERROR: throw new Exception(message.getMessage(locale));
case Message.WARNING: log.warn(message.getMessage(locale)); break;