Query XML trees overview (LINQ to XML)

After you've instantiated an XML tree, writing queries is the most effective way to extract data from the tree. Also, querying combined with functional construction enables you to generate a new XML document that has a different shape from the original document.

For background information about LINQ queries, see:

In this section

This section of articles provides information, including examples, about LINQ to XML queries. It comprises the following subsections:

Article Description
Basic queries Provides common examples of querying XML trees.
Projections and transformations Provides common examples of projecting from and transforming XML trees.
Advanced query techniques Provides query techniques that are useful in more advanced scenarios.
LINQ to XML for XPath users Presents a number of XPath expressions and their LINQ to XML equivalents.
Introduction to pure functional transformations Presents a small tutorial on writing queries in the style of functional programming.

See also