Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

In my application I am working with the RSS Feeds for that I am loading the XML document is as follows:-

XDocument Feeds = XDocument.Load(txtRssUrl.Text);<br />


While running in the above statement getting error is as follows

Cannot open 'http://www.c-sharpcorner.com/Rss/News.aspx'. The Uri parameter must be a relative path pointing to content inside the Silverlight application's XAP package. If you need to load content from an arbitrary Uri, please see the documentation on Loading XML content using WebClient/HttpWebRequest.

Here i am Using the XDocument because i am writing this code under an Silverlight application so here it does not support XmlDocument.

Thanks and Regards
V.S.R.K.raju
Posted
Updated 22-Jul-10 22:20pm
v3
Comments
LittleYellowBird 23-Jul-10 4:21am    
I hope you don't mind but I have removed your comment about this being urgent, everyone's problems are urgent and saying so just annoys people. :)

You are trying to load xml from a web page directly into your variable using the XMLDocument Load method.

As the error suggests try downloading the RSS feed by using WebClient asynchronously and then load it into the feeds variable.
 
Share this answer
 
v2
You can't load files from the client's machine. The error message is telling you that.
 
Share this answer
 
If you are trying an RSS Reader in Silverlight, have a look at this,

A Simple Silverlight RSS Reader[^]
 
Share this answer
 

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