Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to display data from XML file over web address such as "http://www.indiatogether.org/rss/environment/home.xml" to a page of html. How we can export that data to html page. I don't want to display it in table, i want it to be displayed in div control.
Thanks For help..
Posted

1 solution

C#
string url = "http://indiatogether.org/rss/category/environment";
XmlReader reader = XmlReader.Create(url);
SyndicationFeed feed = SyndicationFeed.Load(reader);
reader.Close();
foreach (SyndicationItem item in feed.Items)
{
    // you can add below data to any control you want
    String subject = item.Title.Text;    
    String summary = item.Summary.Text;
    ...                
}


note: Add System.ServiceModel in references

if you not using .net try with jfeed
http://www.script-tutorials.com/import-rss-feeds-using-jfeed-jquery/[^]
 
Share this answer
 
v2
Comments
Silvercorer 7-May-14 7:26am    
Thank You for help.. but i am not using any Plateform such as .net. it is just an html page. writing code in notepad.

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