How to read XML into a DataTable?

后端 未结 7 1599
星月不相逢
星月不相逢 2020-12-16 02:51

I have some XML in a string in memory exactly like this:


  EURCHF
  EURGBP         


        
7条回答
  •  暖寄归人
    2020-12-16 03:40

    Like this:

    Dim strXmlString As String = "Table11"
    strXmlString += "Table22"
    Dim srXMLtext As System.IO.StringReader = New System.IO.StringReader(strXmlString)
    
    Dim dt As New DataTable
    dt.ReadXml(srXMLtext)
    

提交回复
热议问题