Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ds As New DataSet()
''读入XML文档
ds.ReadXml(Me.TextBox1.Text)
Dim tb As DataTable
Dim dv As DataView
tb = ds.Tables(0)
dv = New DataView(tb)
Me.DataGrid1.DataSource = dv
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'获取文件返回文件路径
Dim strFileDirectary As String
Me.OpenFileDialog1.ShowDialog()
strFileDirectary = Me.OpenFileDialog1.FileName
TextBox1.Text = strFileDirectary
End Sub