Gustav Brock
Gustav at cactus.dk
Thu Nov 29 06:26:14 CST 2007
Hi Erwin Good! That explains. No kicking from here, but it would be nice if you posted your findings from experimenting with it. Building an HTML parser yourself is an alternative but it's like reinventing the wheel. /gustav >>> Erwin.Craps at ithelps.eu 29-11-2007 13:07 >>> I thought it was a ASP for websites only! Didn't see the "Strip HTML tags from a string" but only the " HTML Entity Decode" Mea culpa, I'll turn my but so you can kick it.... Rather like to have the VB code than the control, but it should do it... Erwin -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Thursday, November 29, 2007 12:38 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] HTML code stripper Hi Erwin Just curious, why wouldn't this control fit your purpose? To me it seems exactly what you are looking for but I may be missing something. <quote> The Chilkat ASP String Component is freeware and may be used in any ASP application. To install, download and unzip the ASP String Component. Then copy the CkString.dll to a directory on your ASP Web Server and register it with regsvr32.exe. The CkString.dll is a standard ActiveX component. It may also be used in Visual Basic 6.0, Delphi, Cold Fusion, Visual FoxPro, PowerBuilder, MFC, or any other programming language that supports ActiveX components. </quote> http://www.example-code.com/asp/aspstring.asp Example code here: <snip> set cks = Server.CreateObject("CkString.CkString") ' Strip HTML from a string. cks.Str = "<html><body><p>This is a test<br>Here is a <a href=""http://www.chilkatsoft.com"">test link</a></p></body></html>" cks.StripHtml ' Prints "This is a testHere is a test link" Response.Write cks.Str + "<br>" ' Perhaps it's better to replace <br> tags with SPACE chars first... cks.Str = "<html><body><p>This is a test<br>Here is a <a href=""http://www.chilkatsoft.com"">test link</a></p></body></html>" cks.ReplaceAll "<br>"," " cks.ReplaceAll "<BR>"," " cks.StripHtml ' Prints "This is a test Here is a test link" Response.Write cks.Str </snip> /gustav >>> Erwin.Craps at ithelps.eu 28-11-2007 20:40 >>> I already have the process automated, but I see that HTML code get's into my database. Things like <DIV> <b> color etc. Some stuff I already replace/remove like <br> I just want plain simple text in this case.