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

Dailbert Source #16

@dearsherlock

Description

@dearsherlock

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions