Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5: Working with Data > Retrieving Data Using LINQ and XML

Retrieving Data Using LINQ and XML

This section is an introduction to getting data in XML and using LINQ. In this example, we'll return data from Twitter using APIs. LINQ is a set of methods, operations, rules, and types that allow data to be queried within a .NET language such as Visual Basic or C#. LINQ initially shipped within the .NET 3.5 Framework, and LINQ support for several data providers exists within the Mono project.

LINQ to XML is a technology that allows XML documents to be converted into XElement objects, queried based on some criteria, and converted into a collection of objects. The queries are performed within the local execution engine. In Listing 5.14, an asynchronous request is performed against the Twitter API to return a specific user's timeline—my own in this case.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint