Private Sub Read_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim swXML As New System.IO.StringWriter
dsAuthors.WriteXml(swXML)
TextBox1.Text = swXML.ToString
End Sub
Private Sub Write_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If dsAuthors Is Nothing Then
Return
End If ' Create a file name to write to.
Dim filename As String = "myXmlDoc.xml"
' Create the FileStream to write with.
Dim myFileStream As New System.IO.FileStream(filename, ystem.IO.FileMode.Create)
' Write to the file with the WriteXml method.
dsAuthors.WriteXml(myFileStream)
End Sub
浙公网安备 33010602011771号