The LINQ to XML API

In the previous chapter, I demonstrated creating an XML document using the W3C DOM XML API and just how cumbersome that API can be. I also showed you some of the techniques I have seen used to circumvent the pain it causes.

I also let you in on a seemingly little-known secret about LINQ: the fact that LINQ is not just about data queries, it is also about XML. I told you there was a new XML API on the horizon, and that API is the LINQ to XML API.

Now, there is a better, or at least simpler, way to construct, traverse, manipulate, and query XML, and it's called LINQ to XML. In this chapter, I show you how to create, manipulate, and traverse XML documents using the LINQ to XML API, as well as how to perform searches on an XML ...

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.