locked
Data binding - LINQ to XML or DataSet? RRS feed

  • Question

  • What are the pros / cons of data binding using LINQ to XML vs. reading XML into a DataSet and binding to the DataSet? The XML is returned from a web service database query.

    Thanks!
    Wednesday, June 18, 2008 9:38 PM

Answers

  • ->What are the pros / cons of data binding using LINQ to XML vs. reading XML into a DataSet and binding to the DataSet? The XML is returned from a web service database query.

    If you are dealing with XML, there is no particular good reason you need to work with DataSet as long as your XML data doesn't describe any relational data as DB.

    LINQ to XML is new approach to retrieve data from XML data store, it supports rich and nice query like syntax which is seamlessly integrated into C#/VB.NET programming language, from the functional perspective, it doesn't add anything fundamental new, you could still use the XAML friendly XmlDataProvider to access the XML.

    Hope this helps
    • Marked as answer by Marco Zhou Wednesday, June 25, 2008 11:03 AM
    Monday, June 23, 2008 7:55 AM