An Extensive Examination of LINQ: Querying and Searching XML Documents Using LINQ to XML

XML is an increasingly popular way to encode documents, data, and electronic messages. Over the years Microsoft has offered a variety of libraries to facilitate creating, modifying, querying, and searching XML documents. LINQ to XML is a relatively new set of XML-related classes in the .NET Framework (found in the System.Xml.Linq namespace), which enable developers to work with XML documents using LINQ’s features, syntax, and semantics. As discussed in an earlier article, Introducing LINQ to XML, LINQ to XML is a simpler and easier to use API than previous libraries. Because LINQ to XML can utilize LINQ’s query syntax and assortment of standard query operators, LINQ to XML code is usually very terse and readable.

This article continues our look at LINQ to XML. Specifically, we explore how to query XML documents using axis methods as well as how to search and filter XML documents using both LINQ’s Where method and XPath expressions. Read on to learn more!

Note: If you have not yet read Introducing LINQ to XML please do so before reading this article…

Read the entire article,
An Extensive Examination of LINQ: Querying and Searching XML Documents Using LINQ to XML by clicking here.

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read