1 XmlDocument doc = new XmlDocument(); 2 doc.Load(HttpContext.Current.Server.MapPath("~/App_Data/" + xmlName + ".xml")); 3 XmlNodeList nodeList = doc.SelectNodes(xpath); 4 foreach (XmlNode sub in nodeList) 5 { 6 if (value.IndexOf(sub.Attributes["value"].Value) != -1) 7 { 8 value = sub.Attributes["value"].Value; 9 } 10 }