Hi,
Please I need, If it exist a freeware software that permits to me to extract plain text from an html file. Or other tips are welcome
Many Thanks
Marco
// C:\FWH\SAMPLES\HTML2TXT.PRG
#include "FiveWin.ch"
MEMVAR cINNText
FUNCTION Main()
LOCAL cFile := ".\GMAP.HTML"
IF FILE( "Boschi.txt" )
FERASE( "Boschi.txt" )
ENDIF
MsgRun( "WAIT... Converting HTML to TEXT. ", ;
"Please, Wait ", ;
{ || WinExec( CONVERT_HTML2TXT( cFile ) ), 3 } )
MemoEdit( MemoRead( "Boschi.txt" ) )
RETURN NIL
FUNCTION CONVERT_HTML2TXT( cFile )
LOCAL oExplorer := TOLEAuto():New( "InternetExplorer.Application" )
PRIV cINNText
oExplorer:Navigate2( cFile )
DO WHILE oExplorer:ReadyState <> 4
hb_idleSleep( 1 )
ENDDO
cINNText := oExplorer:Document:Body:InnerText
MemoWrit( "Boschi.txt", cINNText )
// MemoEdit( MemoRead( "Boschi.txt" ) )
oExplorer:Quit()
RETURN NIL
// FIN / END
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 43 guests