Partilhar via


Querying XML Trees

This section provides examples of LINQ to XML queries.

For more information about writing LINQ queries, see Getting Started with LINQ.

After you have 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.

In This Section

Topic

Description

Basic Queries (LINQ to XML)

Provides common examples of querying XML trees.

Projections and Transformations (LINQ to XML)

Provides common examples of projecting from and transforming XML trees.

Advanced Query Techniques (LINQ to XML)

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.

Pure Functional Transformations of XML

Presents a small tutorial on writing queries in the style of functional programming.

See Also

Concepts

Programming Guide (LINQ to XML)

Other Resources

Getting Started with LINQ