public void ReadFromXml(string xml) { XmlSettings.LoadXml(xml.Replace("\"utf-16\"", "\"utf-8\"")); // var listAppSettings = XmlSettings.DocumentElement.SelectNodes("setting").Cast <XmlNode>().Select(a => new { name = a.Attributes["name"].Value, value = a.Attributes["value"].Value }); // Get Type Intention_Type = (EN_App_Intention_Type)Enum.Parse(typeof(EN_App_Intention_Type), listAppSettings.Where(a => a.name == "Intention_Type").First().value); }