private AdferoArticlePhotoList ListArticlePhotosFromXmlString(string xml) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); int totalCount = int.Parse(doc.SelectSingleNode("//articlePhotos").Attributes["totalCount"].Value); AdferoArticlePhotoList articlesPhotosList = new AdferoArticlePhotoList(); articlesPhotosList.TotalCount = totalCount; foreach (XmlNode n in doc.SelectNodes("//articlePhotos/articlePhoto")) { foreach (XmlNode na in n.SelectNodes("id")) { AdferoArticlePhotoListItem item = new AdferoArticlePhotoListItem(); item.Id = int.Parse(na.InnerText); articlesPhotosList.Items.Add(item); } } return(articlesPhotosList); }
private AdferoArticlePhotoList ListArticlePhotosFromXmlString(string xml) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); int totalCount = int.Parse(doc.SelectSingleNode("//articlePhotos").Attributes["totalCount"].Value); AdferoArticlePhotoList articlesPhotosList = new AdferoArticlePhotoList(); articlesPhotosList.TotalCount = totalCount; foreach (XmlNode n in doc.SelectNodes("//articlePhotos/articlePhoto")) { foreach (XmlNode na in n.SelectNodes("id")) { AdferoArticlePhotoListItem item = new AdferoArticlePhotoListItem(); item.Id = int.Parse(na.InnerText); articlesPhotosList.Items.Add(item); } } return articlesPhotosList; }