예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }