Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <rss version="2.0" xml:base="http://www.bt.dk" xmlns:dc="http://purl.org/dc/elements/1.1/">
- <channel>
- <title>www.bt.dk</title>
- <link>http://www.bt.dk</link>
- <description></description>
- <language>da</language>
- <item>
- <title>title1</title>
- <link>www1</link>
- <description>desc1</description>
- <pubDate>date1</pubDate>
- <enclosure url="jpg1" type="image/jpeg"/>
- </item>
- <item>
- <title>title1</title>
- <link>www1</link>
- <description>desc1</description>
- <pubDate>date1</pubDate>
- </item>
- </channel>
- </rss>
- var feeds = from feed in feedXML.Descendants("item") select new
- {
- site = Site,
- title = feed.Element("title").Value,
- link = feed.Element("link").Value,
- description = (string)feed.Element("description") ?? "tom",
- date = feed.Element("pubDate").Value,
- imageUrl = (string)feed.Element("enclosure").Attribute("url") ?? "tom"
- };
Advertisement
Add Comment
Please, Sign In to add comment