Sample code for 30+ languages & platforms
Classic ASP

Convert HTML to plain-text

See more HTML-to-XML/Text Examples

Demonstrates how to convert HTML to plain-text.

Chilkat Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

set h2t = Server.CreateObject("Chilkat.HtmlToText")

' Set the HTML:

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

plainText = h2t.ToText(html)

Response.Write "<pre>" & Server.HTMLEncode( plainText) & "</pre>"

' The output looks like this:

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

%>
</body>
</html>