HTML Stripping

Results 1 to 2 of 2

Thread: HTML Stripping

  1. #1
    Steve Muise Guest

    Default HTML Stripping

    I&#039m trying find the best way way to strip all HTML tags except the one&#039s I want to keep out of a FrontPage html page. The one&#039s I want to keep are the simple ones, plus I would also like to be able to replace certain tags with another tag. Anybody tried this before. I&#039m going to use the stripped content as an include file, while still allowing the content-providers to use FrontPage.<BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: HTML Stripping

    I would just write an ASP page that reads in the contents of an HTML file using the FileSystemObject (see, then I would use the replace function to replace all of the HTML tags you want to strip with "" (see for Replace technical docs)<BR><BR>So, you could do:<BR><BR>Dim strContents<BR>strContents = &#039read the file contents of a particular HTML page into this string variable<BR><BR>&#039Now, replace all of the HTML tags<BR>strContents = Replace(strContents, "&#060;P&#062;","",1,-1,1)<BR>strContents = Replace(strContents, "<BR>","",1,-1,1)<BR>strContents = Replace(strContents, "&#060;LI&#062;","",1,-1,1)<BR>&#039And so on...<BR><BR>Finally, write the contents of strContents back to the file...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts