You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
Other code:
private List ParseDilbertItemList(string text)
{
var xml = XDocument.Parse(text);
var items = xml.Descendants("item");
int size = items.Count();
var list = items.Select(x =>
new DilbertItem()
{
Title = x.Element("title").Value,
StripUrl = x.Element("enclosure").Attribute("url").Value
}).ToList();
return list;
}
You can change it to "https://api.flickr.com/services/feeds/photos_public.gne?format=rss2" for testing,thanks.
Other code:
private List ParseDilbertItemList(string text)
{
var xml = XDocument.Parse(text);
var items = xml.Descendants("item");
int size = items.Count();
var list = items.Select(x =>
new DilbertItem()
{
Title = x.Element("title").Value,
StripUrl = x.Element("enclosure").Attribute("url").Value
}).ToList();
return list;
}
The run result:
https://farm9.staticflickr.com/8715/16313994273_95b485260f_o.png
detail result:
https://farm8.staticflickr.com/7622/16313996373_09edfba742_o.png
The text was updated successfully, but these errors were encountered: