7

Hi i am trying to read the content into string from feed items.

SyndicationFeed feed = SyndicationFeed.Load(feedReader);    
SydicationContent itemContent = feed.Items.ToList<SyndicationItem>()[0].Content;
string retrivedContent = itemContent .......???

how can I read the text from the itemContent ?

The documentation shows how to create TextSyndicationContent

TextSyndicationContent textContent = new TextSyndicationContent("Some text content"); 

SyndicationItem item = new SyndicationItem("Item Title", textContent, new Uri("server/items";), "ItemID", DateTime.Now); 

Any way to reverse this ?

thanks

Asad
  • 21,468
  • 17
  • 69
  • 94

2 Answers2

25
TextSyndicationContent tsc = (TextSyndicationContent)item.Content;
string myContent = tsc.Text;
Andrew Huey
  • 832
  • 9
  • 20
-1

You could take a look at SyndicationFeed or at SyndicationContent.

Sani Huttunen
  • 23,620
  • 6
  • 72
  • 79
  • Thsnks any way, I am switching to argotic framework, will recommend any one stuck with SyndicaticationFeed to have a look at. http://argotic.codeplex.com/ cheers – Asad Nov 27 '09 at 02:13