|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
What's the alternative to XmlDataDocument?I just discovered XmlDataDocument today, which is the perfect solution to my
problem, but I've just realised that it is obsolete. So what's its replacement? I wish to access an XML file both via XPath and DataSets. What options do I have? Marc Hillman wrote:
> I just discovered XmlDataDocument today, which is the perfect solution Why can't you use Linq-2-XML?> to my problem, but I've just realised that it is obsolete. So what's its > replacement? I wish to access an XML file both via XPath and DataSets. > What options do I have? <http://msdn.microsoft.com/en-us/library/bb675156.aspx> Why do you need a dataset at all? You don't need one if using Linq-2-XML. You just query the XML and load it into a kind of result set and you use that instead of the dataset. I've only just realised that I don't need XmlDocument at all. My plan is
that I load the XML into a DataSet, manipulate the data in a DataSet, and then write the DataSet out in XML when I finish. Two advantages for me 1. I can bind the dataset tables to datagridviews, and 2. I'm much happier dealing with relational data than navigating XML. It all seems to be working, so if there is a flaw in my plan, please let me know. Marc Hillman wrote:
> I've only just realised that I don't need XmlDocument at all. My plan is You can manipulate the queried result of the Linq-2-XML query, do CRUD > that I load the XML into a DataSet, manipulate the data in a DataSet, > and then write the DataSet out in XML when I finish. operations against the result, and write the result out as a XML file all by using Linq-2-XML. You don't need a dataset to do anything. > You can do that with Linq-2-XML, query the XML using Linq-2-XML, bind > Two advantages for me > 1. I can bind the dataset tables to datagridviews, and the result to a control, and you don't need a dataset period. > 2. I'm much happier dealing with relational data than navigating XML. By using Linq-2-XML, one can treat the XML as relational data.> Linq is the new boy on the block and is very powerful -- very powerful > It all seems to be working, so if there is a flaw in my plan, please let > me know. > > indeed. Dataset is old technology. Hello ,
I use nowadays only use XDocuments when dealing with XML , LINQ makes it as easy as querying against a database regards Michel Show quoteHide quote "Mr. Arnold" <Arn***@Arnold.com> schreef in bericht news:uZy5shs6KHA.1424@TK2MSFTNGP04.phx.gbl... > Marc Hillman wrote: >> I've only just realised that I don't need XmlDocument at all. My plan is >> that I load the XML into a DataSet, manipulate the data in a DataSet, and >> then write the DataSet out in XML when I finish. > > You can manipulate the queried result of the Linq-2-XML query, do CRUD > operations against the result, and write the result out as a XML file all > by using Linq-2-XML. You don't need a dataset to do anything. > >> >> Two advantages for me >> 1. I can bind the dataset tables to datagridviews, and > > You can do that with Linq-2-XML, query the XML using Linq-2-XML, bind the > result to a control, and you don't need a dataset period. > > >> 2. I'm much happier dealing with relational data than navigating XML. > > By using Linq-2-XML, one can treat the XML as relational data. > >> >> It all seems to be working, so if there is a flaw in my plan, please let >> me know. >> >> > > Linq is the new boy on the block and is very powerful -- very powerful > indeed. Dataset is old technology.
copy my vb project... is it as easy as copying the directory..
Convert XML schema to DataSet in VB Express 2008? Manually add rows. Problem with AllowUserToAddRows Imports System.Xml In VS 2010 SMTP Mail Problem Select manually a row of dataGridView. VB.net installing SQL 2008 express and database with my vb app Re-using a filestream in a loop Lots of ActiveX COM Controls are missing in "Choose Items" ? |
|||||||||||||||||||||||