Guest User

Untitled

a guest
Feb 28th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <rss version="2.0" xml:base="http://www.bt.dk" xmlns:dc="http://purl.org/dc/elements/1.1/">
  3. <channel>
  4. <title>www.bt.dk</title>
  5. <link>http://www.bt.dk</link>
  6. <description></description>
  7. <language>da</language>
  8.  
  9. <item>
  10. <title>title1</title>
  11. <link>www1</link>
  12. <description>desc1</description>
  13. <pubDate>date1</pubDate>
  14. <enclosure url="jpg1" type="image/jpeg"/>
  15. </item>
  16.  
  17. <item>
  18. <title>title1</title>
  19. <link>www1</link>
  20. <description>desc1</description>
  21. <pubDate>date1</pubDate>
  22. </item>
  23.  
  24.  
  25. </channel>
  26. </rss>
  27.  
  28.  
  29. var feeds = from feed in feedXML.Descendants("item") select new
  30. {
  31. site = Site,
  32. title = feed.Element("title").Value,
  33. link = feed.Element("link").Value,
  34. description = (string)feed.Element("description") ?? "tom",
  35. date = feed.Element("pubDate").Value,
  36. imageUrl = (string)feed.Element("enclosure").Attribute("url") ?? "tom"
  37. };
Advertisement
Add Comment
Please, Sign In to add comment