| |
tomk
Posts: 2
Score: 0
Joined: 1/16/2003
From: United Kingdom
Status: offline
|
Hi all, I'm trying to load a file which contains html tags, parse through that file for some 'special' tags grab the data between those tags then write it out. Problem is, the parsing works fine when testing with a single line test string but doesn't when using the imported file's contents. Code is as follows: Function ParseTags(findBeg, findEnd, myString) DIM myBeg, myEnd, b, bb, e, ee myBeg = InStr(myString, findBeg) + Len(findBeg) myEnd = InStr(myBeg, myString, findEnd) If myBeg > 0 And myEnd > myBeg Then ParseTitle = Trim(Mid(myString, myBeg, myEnd - myBeg)) Else ParseTags = "ERROR: " End If End Function FileName = Server.MapPath(Request.QueryString("ID")) strFileContent = CreateObject("Scripting.FileSystemObject").OpenTextFile(FileName, 1, False, False).readall Response.Write ParseTags("", "", strFileContent)
|
|