Sample code for 30+ languages & platforms
Xbase++

Convert HTML to plain-text

See more HTML-to-XML/Text Examples

Demonstrates how to convert HTML to plain-text.

Chilkat Xbase++ Downloads

Xbase++
LOCAL oH2t
LOCAL cHtml
LOCAL cPlainText

//  This example assumes the Chilkat API to have been previously unlocked.
//  See Global Unlock Sample for sample code.

oH2t := CreateObject("Chilkat.HtmlToText")

//  Set the HTML:

cHtml := "<html><body><p>This is a test.</p><blockquote>Here is text within a blockquote</blockquote></body></html>"

cPlainText := oH2t:ToText(cHtml)

? cPlainText

//  The output looks like this:

//  This is a test.
//  
//      Here is text within a blockquote

oH2t:destroy()