Hopefully, as you started working your way through this chapter, you
quickly realized that it really wasn??™t as bad as you thought. Sure, working with annotations, events, and
axes can be tough, but the purpose of this chapter was to show you that working with them also can be
delightful and downright fun.
You first examined functional construction and the important role it plays in LINQ to XML. Functional
construction provides the capability to easily and efficiently construct an XML document within a single
statement. Then you saw how to add annotations to elements and attributes in an XML tree using the
AddAnnotation method, and how to read annotations once they are applied.
You explored LINQ to XML axis methods, which provide the capability to quickly and efficiently query
an XML tree to find elements and attributes and return their values. Knowing how to use these is absolutely
necessary to understanding and writing query expressions.
Finally, you saw how to stream XML documents using LINQ to XML and the benefits that streaming
provides, such as managing memory and controlling the size of your XML documents.
Pages:
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304