/ Published in: VB.NET
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Public Function StrXml2Table(ByVal StrXML As String) As DataTable Dim ms As MemoryStream Dim returnMs As New DataTable() Try Dim buf() As Byte Dim ds As New DataSet buf = System.Text.UTF8Encoding.ASCII.GetBytes(StrXML) ms = New MemoryStream(buf) ds.ReadXml(ms) Return ds.Tables(0) Catch ex As Exception ' Hacer algo o mostrar mensaje de error Return returnMs Finally If Not ms Is Nothing Then End If End Try End Function