private static IEnumerable<SearchResult> AnalyzeDoc(XmlDocument doc) { List<SearchResult> l = new List<SearchResult>(); XmlNodeList nodes = doc.SelectNodes("//Data/Results/Trap"); foreach (XmlNode node in nodes) { SearchResultTrap cs = new SearchResultTrap { Name = node["Name"].InnerText, ID = Convert.ToInt32(node["ID"].InnerText), Level = node["Level"].InnerText.Trim(), Role=node["GroupRole"].InnerText, Type = node["Type"].InnerText, SourceBook=node["SourceBook"].InnerText }; l.Add(cs); } return l; }
private static IEnumerable <SearchResult> AnalyzeDoc(XmlDocument doc) { List <SearchResult> l = new List <SearchResult>(); XmlNodeList nodes = doc.SelectNodes("//Data/Results/Trap"); foreach (XmlNode node in nodes) { SearchResultTrap cs = new SearchResultTrap { Name = node["Name"].InnerText, ID = Convert.ToInt32(node["ID"].InnerText), Level = node["Level"].InnerText.Trim(), Role = node["GroupRole"].InnerText, Type = node["Type"].InnerText, SourceBook = node["SourceBook"].InnerText }; l.Add(cs); } return(l); }