O'Reilly logo

Introducing Visual C# 2010 by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 29. LINQ to XML

LINQ to XML lets you apply the LINQ query style that we saw in Chapter 27 to XML data. This is done through a set of classes that represent XML data in a way that is designed to accommodate LINQ to Objects queries. These classes are in the System.Xml.Linq namespace, and they make it easy to work with XML. Once you understand how these classes work and relate to one another, you can use LINQ queries to create powerful and simple XML handlers.

The LINQ to XML classes read all the XML data into memory. This is similar to the Document Object Model (DOM) approach, which you may have used in other programming languages. C# does provide support for DOM, but it has been eclipsed by the more flexible and expressive LINQ to XML features. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required