Geeks With Blogs
Calin Tatar C#.NET, VB.NET, WPF, SILVERLIGHT, SQL, WSS, MOSS Linq to XML
Retrieving the object hierarchy from an XML with Linq to XML
I'm writing here an example about how to read XMLs that contains hierarchichal data, not only with one level of child nodes. So, I'm about to threat this problem here. First, I'll define a sample XML hierarchy. The XML contains a list of Headers, each one containing a list of Details. Now, let's create some simple model classes. Now, to read the XML data into this hierarchy of objects, I'm gonna create one method for each level of the hierarchy (GetHeaders - will return all the Headers, GetDetails(header) ......

Posted On Saturday, May 16, 2009 7:03 AM

Copyright © CalinTatar | Powered by: GeeksWithBlogs.net