private AdferoFeedList ListFeedsFromXmlString(string xml) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); int totalCount = int.Parse(doc.SelectSingleNode("//feeds").Attributes["totalCount"].Value); AdferoFeedList feedsList = new AdferoFeedList(); feedsList.TotalCount = totalCount; foreach (XmlNode n in doc.SelectNodes("//feeds/feed")) { foreach (XmlNode na in n.SelectNodes("id")) { AdferoFeedListItem feed = new AdferoFeedListItem(); feed.Id = int.Parse(na.InnerText); feedsList.Items.Add(feed); } } return(feedsList); }
private AdferoFeedList ListFeedsFromXmlString(string xml) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); int totalCount = int.Parse(doc.SelectSingleNode("//feeds").Attributes["totalCount"].Value); AdferoFeedList feedsList = new AdferoFeedList(); feedsList.TotalCount = totalCount; foreach (XmlNode n in doc.SelectNodes("//feeds/feed")) { foreach (XmlNode na in n.SelectNodes("id")) { AdferoFeedListItem feed = new AdferoFeedListItem(); feed.Id = int.Parse(na.InnerText); feedsList.Items.Add(feed); } } return feedsList; }