private static void ReadEntries(XmlNodeList nodes, ICollection <FeedEntry> entries) { Guard.ArgumentNotNull("entries", entries); if (nodes == null) { return; } foreach (XmlNode node in nodes) { FeedEntry entry = new FeedEntry(); entry.ID = node["id"].InnerText; entry.Title = node["title"].InnerText; ReadAuthor(node["author"], entry.Author); DateTime updated, published; ReadDate(node["updated"], out updated); ReadDate(node["published"], out published); entry.Published = published; entry.Updated = updated; ReadLink(node["link"], entry.Link); ReadContent(node["content"], entry.Content); ReadCategories(((XmlElement)node).GetElementsByTagName("category"), entry.Categories); entries.Add(entry); } }
private static void ReadEntries(XmlNodeList nodes, ICollection<FeedEntry> entries) { Guard.ArgumentNotNull("entries", entries); if (nodes == null) return; foreach (XmlNode node in nodes) { FeedEntry entry = new FeedEntry(); entry.ID = node["id"].InnerText; entry.Title = node["title"].InnerText; ReadAuthor(node["author"], entry.Author); DateTime updated, published; ReadDate(node["updated"], out updated); ReadDate(node["published"], out published); entry.Published = published; entry.Updated = updated; ReadLink(node["link"], entry.Link); ReadContent(node["content"], entry.Content); ReadCategories(((XmlElement)node).GetElementsByTagName("category"), entry.Categories); entries.Add(entry); } }