Querying XML Trees

Querying XML Trees


This section provides examples of LINQ to XML queries.

For more information about writing LINQ queries, see .6cc9af04-950a-4cc3-83d4-2aeb4abe4de9

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.



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.

© 2015 Microsoft