把dom读到dataset对象中,
你的意思是不是,把一个xml文档读到内存中,形成结果树,再把架构和数据都读到一个dataset对象中?看看自带帮助,会对你有帮助的。
这时
When a DataSet is synchronized with an XmlDataDocument, both objects are working with a single set of data. This means that if a change is made to the DataSet, the change will be reflected in the XmlDataDocument, and vice versa.
下面我抄了帮助里的例子
Dim xmlDoc As XmlDataDocument = New XmlDataDocument
Dim myDataSet As DataSet = xmlDoc.DataSet
' Add code here to create the schema of the DataSet to view the data.
xmlDoc.Load("XMLDocument.xml")
反之
Dim myDataSet As DataSet = New DataSet
' Add code here to populate the DataSet with schema and data.
Dim xmlDoc As XmlDataDocument = New XmlDataDocument(myDataSet)
Dim myDataSet As DataSet = New DataSet
' Add code here to populate the DataSet with schema and data.
Dim xmlDoc As XmlDataDocument = New XmlDataDocument(myDataSet)