void ImportSettings(XmlDocument doc, bool insertEmptyValue, string filename, string user = null, string group = null)
        {
            if (doc == null)
            {
                throw new ArgumentNullException("doc");
            }

            var tags = doc.GetElementsByTagName("Setting");

            foreach (XmlElement setting in tags)
            {
                string name  = GetXmlValue(setting, "Name");
                string value = Parse(GetXmlValue(setting, "Value"), filename, user, group);
                if (name.Length == 0)
                {
                    throw AppExcept(EXCEPT_BAD_ELEM, name, value);
                }

                if (settings.Contains(name))
                {
                    if (insertEmptyValue || value.Length > 0)
                    {
                        settings [name].MaybeParseUpdate(SettingSource.Xml, value);
                    }
                }
                else
                {
                    Logger.Write(LogLevel.Warning, "Unrecognized xml setting: {0} with value {1}", name, value);
                }
            }
        }