Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/09/2005, 09:03
Avatar de xknown
xknown
 
Fecha de Ingreso: diciembre-2004
Ubicación: Cusco - Perú
Mensajes: 2.248
Antigüedad: 20 años, 2 meses
Puntos: 7
Utilizando la clase XmlTextReader, luego puedes recuperar el valor usando XPath o simplemente iterando sobre el XmlTextReader, te mando un pequeño ejempo:
Código:
        Dim xtr As XmlTextReader
        Try
            xtr = New XmlTextReader("http://test.buayacorp.com/suma.php?a=5&b=9")

            ' Opción 1
            Dim doc As New XmlDocument
            doc.Load(xtr)
            Dim nodos As XmlNodeList = doc.SelectNodes("//Resultado[@valor]")
            If nodos.Count > 0 Then
                Console.WriteLine(nodos.Item(0).Name & " = " & nodos.Item(0).Attributes("valor").Value)
            End If

            ' Opción 2
            While xtr.Read
                If xtr.Name = "Resultado" Then
                    Console.WriteLine(xtr.Name & " = " & xtr.GetAttribute("valor"))
                    Exit While
                End If
            End While
        Catch
        Finally
            If Not xtr Is Nothing Then
                xtr.Close()
            End If
        End Try
Saludos
__________________
Alex Concha
Buayacorp - Programación y Diseño