예제 #1
0
        /// <summary>
        /// Creates an RSS item from an XML node with the 
        /// corresponding child nodes (title,description etc.)
        /// </summary>
        /// <param name="xmlNode">The node to extract the details from</param>
        /// <returns>An RssItemPafi object with details taken from the item node.</returns>
        private RssItemPafi getRssItem(XmlNode xmlNode)
        {
            RssItemPafi rssItem = new RssItemPafi();

              for (int i = 0; i < xmlNode.ChildNodes.Count; i++)
              {
            switch (xmlNode.ChildNodes[i].Name.ToLower())
            {
              case "title":
            {
              rssItem.Title = xmlNode.ChildNodes[i].InnerText;
              break;
            }
              case "description":
            {
              rssItem.Description = xmlNode.ChildNodes[i].InnerText;
              break;
            }
              case "link":
            {
              rssItem.Link = xmlNode.ChildNodes[i].InnerText;
              break;
            }
              case "author":
            {
              rssItem.Author = xmlNode.ChildNodes[i].InnerText;
              break;
            }
              case "comments":
            {
              rssItem.Comments = xmlNode.ChildNodes[i].InnerText;
              break;
            }
              case "ervenyes":
            {
              rssItem.Ervenyes = xmlNode.ChildNodes[i].InnerText;
              break;
            }
              case "guid":
            {
              rssItem.Guid = xmlNode.ChildNodes[i].InnerText;
              break;
            }
            }
              }

              return rssItem;
        }
예제 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="rssItem"></param>
 public void Add(RssItemPafi rssItem)
 {
     List.Add(rssItem);
 }