Hello
  
    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

posted on 2006-07-21 21:30  WaikingLiu  阅读(134)  评论(0)    收藏  举报