I want to get news from an rss feed of a news web site and show them in a textbox.. And here is the code I've tried..
Uri feeduri = new Uri(@"http://lankacnews.com/sinhala/feed/");
var feed = await client.RetrieveFeedAsync(feeduri);
foreach (SyndicationItem item in feed.Items)
{
textBox1.Text += item.Title.Text + Environment.NewLine;
textBox1.Text += item.Summary.Text.ToString() + Environment.NewLine + Environment.NewLine;
}
But the problem is it doesnt show only the title and news in the text box. It shows HTML tags such as <p> <br>..
And some times it shows the whole HTML code for images like "<img class="alignnone size-full wp-image-109622" alt=anura-soami src="http://lankacnews.com/sinhala/wp-content/uploads/2014/02/anura-soami.png" width=630 height=753>"
Is there anyway to prevent this ?