Geeks With Blogs


INauseous() Shawn Cicoria - Solution Architect, Craftsman and Artisan - INauseous() - Main Blog Here: December 2008 Entries
Emitting XML via LINQ
Just posted about reading XML via LINQ. Now, this post is about the opposite direction - emitting XML from a collection. The simplicity of LINQ provides a straightforward interaction with XML makes LINQ to XML for me one of the easiest and most natural ways to interact with XML. The following emits a collection of objects out to an XElement (which can be streamed elsewhere as required. 35 Customer[] customers = new Customer[]{ 36 new Customer{ 37 firstName="john", lastName="lennon"}, 38 new Customer{ ......

Posted On Wednesday, December 3, 2008 7:49 AM

Copyright © Shawn Cicoria | Powered by: