Local m.myHTML,m.parsed myHTML=[This< br> is an < font color="red">< b>example< /b >< /font >< Hr>x2 < x3] *myHTML= FileToStr(GetFile('HTM')) parsed = '' oParser = Createobject('myParser',m.myHTML,@m.parsed) ? m.Parsed *StrToFile(m.Parsed,'ParseResult.txt') Define Class myParser As Form Add Object oWB As OleControl With ; OleClass = 'Shell.Explorer' Procedure Init Lparameters tcHTML, tcParse lcTemp = Sys(2015)+'.htm' Strtofile(tcHTML,lcTemp) With This.oWB .Navigate2('file://'+Fullpath(lcTemp)) Wait window 'Parsing...' nowait Do While .ReadyState # 4 && Wait for ready state EndDo Endwith Erase (lcTemp) tcParse = This.oWB.Document.body.innerText Wait clear Return .f. Endproc Enddefine
Çetin Basöz
MS Foxpro MVP, MCP
Welcome to FoxyClasses
No hay comentarios. :
Publicar un comentario
Los comentarios son moderados, por lo que pueden demorar varias horas para su publicación.