tags:

views:

167

answers:

2

I have an xml file containing a lot of data. The structure of the file derives from several formats I have the xsd files for. They all merge to the schema that completes the view.

What is the best way accessing the xml file using linq when I need to get all data and work with it?

+1  A: 

Your looking for XDocument, which is a new xml model introduced to provide support for LINQ. You can find more information here: http://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument.aspx

jrista
A: 

Microsoft has been experimenting with a LINQ to XSD provider. It might be worth checking out.

There's an Open Source LINQ-to-XSD tool at [http://linqtoxsd.codeplex.com/](http://linqtoxsd.codeplex.com/)... YMMV.
ewall