Giles wrote:
in DHTML, body.innerText nicely strips out the raw textual contents of a
formatted page. Is there a straighforwards way to do this with a server-side
ASP function (e.g. on a string containing the HTML) ? It is to fill a
database field used for a simple search routine.
If you can, you might consider using the Indexing Services instead of
rolling your own search routine.
http://www.codeproject.com/asp/indexserver.asp
If that's not an option, you should be able to use Internet Explorer
from an ASP.
<% Option Explicit
Dim ie: Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate "about
:blank"
Dim doc: Set doc = ie.Document
doc.open
doc.writeln "<dl>"
doc.writeln "<dt>em</dt>"
doc.writeln "<dd>Indicates <em>emphasis</em></dd>"
doc.writeln "<dt>strong</dt>"
doc.writeln "<dd>Indicates <strong>stronger emphasis</strong></dd>"
doc.writeln "</dl>"
doc.close
Response.ContentType = "text/plain"
Response.Write doc.documentElement.InnerText
%>