Unicode C
Unicode C
Convert HTML to plain-text
See more HTML-to-XML/Text Examples
Demonstrates how to convert HTML to plain-text.Chilkat Unicode C Downloads
#include <C_CkHtmlToTextW.h>
void ChilkatSample(void)
{
HCkHtmlToTextW h2t;
const wchar_t *html;
const wchar_t *plainText;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
h2t = CkHtmlToTextW_Create();
// Set the HTML:
html = L"<html><body><p>This is a test.</p><blockquote>Here is text within a blockquote</blockquote></body></html>";
plainText = CkHtmlToTextW_toText(h2t,html);
wprintf(L"%s\n",plainText);
// The output looks like this:
// This is a test.
//
// Here is text within a blockquote
CkHtmlToTextW_Dispose(h2t);
}