Introduction to LINQ to XML Operators

The LINQ to XML API extends the LINQ to Objects Standard Query Operators with XML-specific operators. These XML operators are extension methods that are defined in the System.Xml.Linq.Extensions class, which itself is nothing more than a container class for these extension methods.

Each of these XML operators is called on a sequence of some LINQ to XML data type and performs some action on each entry in that sequence, such as returning all the ancestors or descendants of the entry.

Virtually every XML operator in this chapter has an equivalent method I covered in the previous chapter. The difference being that the method covered in the previous chapter is called on a single object, and the operator in this ...

Get Pro LINQ: Language Integrated Query in C# 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.