私はXDocumentでRSSフィードを読み込もうとしています。 URLは次のとおりです。
XDocument doc = XDocument.Load(url);
しかし、私はエラーが発生しています:
Cannot open "http://www.ft.com/rss/home/uk". The Uri parameter must be a file system relative or absolute path.
回答:
回答№1は1XDocument.Load
URLには記載されていません。 ドキュメンテーション.
私が完全にテストしなかった次のコードのようなものを試してみてください:
using(var httpclient = new HttpClient())
{
var response = await httpclient.GetAsync("http://www.ft.com/rss/home/uk");
var xDoc = XDocument.Load(await response.Content.ReadAsStreamAsync());
}