You need to filter out anything between the < and the >(including the signs them self), except for the <br> and the </p>.
Example:
------------------Code:Option Explicit Private Sub Form_Load() MsgBox HTMLParser("<p><ul><b>This is the text you would see in the web browser.<br>Test.</b></p><br>This is the end") End Sub Private Function HTMLParser(ByVal sHTML As String) As String Dim lCounter As Long Dim sTemp As String For lCounter = 1 To Len(sHTML) Select Case Mid(sHTML, lCounter, 1) Case "<" Select Case LCase$(Mid$(sHTML, lCounter, 4)) Case "<br>", "</p>" '<br>, is next line; </p> is end paragraf sTemp = sTemp & vbCrLf lCounter = lCounter + 3 Case Else Do Until Mid(sHTML, lCounter, 1) = ">" lCounter = lCounter + 1 Loop 'End Case End Select Case Else sTemp = sTemp & Mid(sHTML, lCounter, 1) 'End Case End Select Next HTMLParser = sTemp End Function
Vincent van den Braken
EMail: [email protected]
ICQ: 15440110
Homepage: http://www.azzmodan.demon.nl
[This message has been edited by Azzmodan (edited 01-11-2000).]




Reply With Quote