Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Dailbert Source #16

Open
dearsherlock opened this issue Mar 26, 2015 · 0 comments
Open

Dailbert Source #16

dearsherlock opened this issue Mar 26, 2015 · 0 comments

Comments

@dearsherlock
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant