[Gambas-user] Parsing a xml file from internet

Matías Manuel Grandi matiasgrandi at ...626...
Wed Aug 4 13:50:13 CEST 2010


Hi guys! First of all...I'm new to gambas!
I'm traying to parse a xml from
http://8tracks.com/sets/460486803/play.xml?mix_id=2000
I can get the file with the following code:

' 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


The xml file is now in a varaible called "buffer". How can I get it
from xmlread object?

Thanks!
Mato.-




More information about the User mailing list