public bool Load(String abbreviationsFile = null)
{
bool retVal = true;
if (String.IsNullOrEmpty(abbreviationsFile))
{
abbreviationsFile = UserManager.GetFullPath(AbbreviationFile);
}
var doc = new XmlDocument();
try
{
_abbreviationList.Clear();
if (File.Exists(abbreviationsFile))
{
doc.Load(abbreviationsFile);
var abbrNodes = doc.SelectNodes("/ACAT/Abbreviations/Abbreviation");
if (abbrNodes != null)
{
// load all the abbreviations
foreach (XmlNode node in abbrNodes)
{
createAndAddAbbreviation(node);
}
}
}
else
{
Log.Debug("Abbreviation file " + abbreviationsFile + " does not exist");
retVal = false;
}
}
catch (Exception ex)
{
Log.Debug("Error processing abbreviations file " + abbreviationsFile + ". Exception: " + ex);
retVal = false;
}
return retVal;
}