Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Routines to parse html tables in vfp
Message
De
28/03/2001 16:57:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00489286
Message ID:
00489660
Vues:
8
>I need to parse the cells of an html table and save them in a VFP table(dbf).
>
>I think the html type lib has routines for this but I don't find any documentation for it.
>
>Has anyone had luck with this. I guess I can write my own but I would prefer to use something tried and tested if possible. This is a free project I am doing as a favor for someone and want to finish asap without having to reinvent the wheel.
>

This should be fairly straightforward by automating IE:

oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Navigate("Someplace.com/somefile.htm")
oTable = oIE.Document.Body.all("mytable") &&assuming the table has an id or name assigned
FOR EACH oRow IN oTable.Rows
FOR EACH oCell IN oRow.Cells
?oCell.InnerText
ENDFOR
ENDFOR

If the table has no id assigned, you'll have to iterate through the all collection to find which element is the table you're looking for.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform