Estoy tratando de bajar un xml de un sitio de internet, y "parsearlo"
Obtenerlo es sencillo, con el siguiente código lo logro (queda almacenado en una variable llamada buffer):
' gambas class file
PUBLIC url AS String
PUBLIC SUB Form_Open()
DIM reader AS XmlReader
DIM h AS HttpClient
DIM buffer AS String
DIM doc AS XmlDocument
h = NEW HttpClient AS "h"
h.URL = "http://8tracks.com/sets/460486803/play.xml?mix_id=2000"
h.Async = FALSE
h.Timeout = 60
h.Get
IF h.Status < 0 THEN
PRINT "ERROR"
ELSE
' Success - read the data
IF Lof(h) THEN READ #h, buffer, Lof(h)
END IF
PUBLIC url AS String
PUBLIC SUB Form_Open()
DIM reader AS XmlReader
DIM h AS HttpClient
DIM buffer AS String
DIM doc AS XmlDocument
h = NEW HttpClient AS "h"
h.URL = "http://8tracks.com/sets/460486803/play.xml?mix_id=2000"
h.Async = FALSE
h.Timeout = 60
h.Get
IF h.Status < 0 THEN
PRINT "ERROR"
ELSE
' Success - read the data
IF Lof(h) THEN READ #h, buffer, Lof(h)
END IF
El problema es que no se como pasar esa variable a un objeto xmlread para poder tratarla como un archivo xml y obtener la información que necesito...
Alguna solución?
Gracias!
Mato.-