Ver Mensaje Individual
  #3 (permalink)  
Antiguo 30/03/2005, 13:59
Avatar de xknown
xknown
 
Fecha de Ingreso: diciembre-2004
Ubicación: Cusco - Perú
Mensajes: 2.248
Antigüedad: 20 años, 1 mes
Puntos: 7
Podrías utilizar un MemoryStream para que las cosas sean un poco más rápidas:
Código:
Public Function StrXml2Table(ByVal StrXML As String, ByVal Usuario As String) As DataTable
        Dim ms As MemoryStream
        Dim sw As StreamWriter
        Try
            Dim ds As New DataSet
            ms = New MemoryStream(StrXML.Length)
            sw = New StreamWriter(ms)

            sw.Write(StrXML)
            ds.ReadXml(ms)

            ms.Close()

            Return ds.Tables(0)
        Catch ex As Exception
            Throw New Exception("Error en StrXml2Table: " & ex.ToString)
        Finally
            If Not sw Is Nothing Then : sw.Close() : End If
            If Not ms Is Nothing Then : ms.Close() : End If
        End Try
End Function
__________________
Alex Concha
Buayacorp - Programación y Diseño