We have spent the previous 10 episodes looking at extensions. It is time to take a new tack. We are going to explore coding techniques. After all, code is a tool, right?
These days, Web sites are providing access to a large amount of data, everything from RSS feeds to pictures to movie titles and more. Often, all you need to do in an application is send an HTTP request to a Web site. The Web site sends the data back via XML, and the easiest way to work with that data is to use LINQ queries. In this episode, Robert shows you how to use LINQ to XML to make sense of the XML data a Web site sends you. He gives examples of working with an RSS feed, retrieving images from Flickr, querying for wineries and wines using Wine.com, and returning movies from NetFlix. You'll see basic queries, see how to retrieve data from elements and attributes, and see how to work with namespaces.
You can find this episode at http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-Toolbox-Using-LINQ-to-XML-to-Query-Data-on-the-Web or watch it here. And, as promised, the code I used is attached for your viewing and coding pleasure.