Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. How to get the description of an item in RSS feeds

How to get the description of an item in RSS feeds

Scheduled Pinned Locked Moved WPF
csharphtmlwcfxmlhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nekkantidivya
    wrote on last edited by
    #1

    Hi, I am working on a silverlight application which deals with RSS feeds. As we cannot directly access RSS feeds of all the websites I wrote a WCF service to get the RSS feeds and then I passed them to the silverlight application. In this application I have to get the Title, description and Navigation link of each item in the feed. In description I am getting all the Html content in it for description. But I have to get only the text in the description. I tried to get it like this rssReader = new XmlTextReader(FeedURL); SyndicationFeed feed = SyndicationFeed.Load(rssReader); List<SyndicationItem> feedItems = new List<SyndicationItem>(); foreach (SyndicationItem feedItem in feed.Items) { feedItems.Add(feedItem); } But for this I am getting error at line:2 as: The type 'System.Xml.XmlReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. I tried to add System.Xml of Version=2.0.5.0 but I cannot find it in the reference. If anyone have idea to solve this error or procedure to get only the text in the description node please reply me. Thanks in advance.

    M 1 Reply Last reply
    0
    • N Nekkantidivya

      Hi, I am working on a silverlight application which deals with RSS feeds. As we cannot directly access RSS feeds of all the websites I wrote a WCF service to get the RSS feeds and then I passed them to the silverlight application. In this application I have to get the Title, description and Navigation link of each item in the feed. In description I am getting all the Html content in it for description. But I have to get only the text in the description. I tried to get it like this rssReader = new XmlTextReader(FeedURL); SyndicationFeed feed = SyndicationFeed.Load(rssReader); List<SyndicationItem> feedItems = new List<SyndicationItem>(); foreach (SyndicationItem feedItem in feed.Items) { feedItems.Add(feedItem); } But for this I am getting error at line:2 as: The type 'System.Xml.XmlReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. I tried to add System.Xml of Version=2.0.5.0 but I cannot find it in the reference. If anyone have idea to solve this error or procedure to get only the text in the description node please reply me. Thanks in advance.

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      Hi, I have created a sample for you. Please download it from this link [http://michaelsync.net/demo/Silverlight RSS Proxy.rar](http://michaelsync.net/demo/Silverlight RSS Proxy.rar)[[^](http://michaelsync.net/demo/Silverlight RSS Proxy.rar "New Window")] I don't think you need to add this assembly since it should be there by default. You can follow this article http://www.dotnetcurry.com/ShowArticle.aspx?ID=252[^]

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) Microsoft MVP (Silverlight), WPF/Silverlight Insiders

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups