CHAPTER 29

image

Linq to XML

XML is a very popular format—a very popular format—which makes it a bit surprising that it has often been more than a bit of a pain for developers to deal with.

Rockin’ It “Old School”

The first version of the .NET base classes provided two ways of parsing XML. The simple way to deal with XML was to use the XML DOM, which allows the developer to easily find elements in a document, validate them against a schema, and do that sort of thing. It is fairly simple to use,1 but it is a fairly big stick; it takes a bit of time to load and parse XML and consumes quite a bit of memory.

The opposite end of the spectrum is represented ...

Get A Programmer's Guide to C# 5.0, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.