Lianja
Lianja
Convert HTML to Plain Text
Demonstrates how to convert HTML to plain text.Chilkat Lianja Downloads
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loH2t = createobject("CkHtmlToText")
lcHtml = loH2t.ReadFileToString("c:/temp/test.html","utf-8")
if (loH2t.LastMethodSuccess = .F.) then
? loH2t.LastErrorText
release loH2t
return
endif
lcPlainText = loH2t.ToText(lcHtml)
if (loH2t.LastMethodSuccess = .F.) then
? loH2t.LastErrorText
release loH2t
return
endif
? lcPlainText
release loH2t