Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
for get rss i use below code
C#
System.Net.WebRequest myRequest = System.Net.WebRequest.Create(rssURL);
            System.Net.WebResponse myResponse = myRequest.GetResponse();
            System.IO.Stream rssStream = myResponse.GetResponseStream();
            System.Xml.XmlDocument rssDoc = new System.Xml.XmlDocument();
            rssDoc.Load(rssStream);
            System.Xml.XmlNodeList rssItems = rssDoc.SelectNodes("rss/channel/item");


so i can get description,Title with below code
C#
rssItems.Item(i).SelectSingleNode("description").InnerText.ToString()


but i can't get Link from rss
what can i to do?
Posted

I can't be absolutely sure, as for that I need html code example from rss, but you may use something like that
C#
rssItems.Item(i).SelectSingleNode("description").Attributes["href"].Value

if link is attrib at "description" node.
 
Share this answer
 
so thanks
but Title and description don't have any attribute
 
Share this answer
 
v2
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900