Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Included HTML File Parsing


Message #1 by "Chris R. Thompson" <cthompson@n...> on Thu, 14 Feb 2002 15:12:29 -0700
Anybody know how in ASP to open a file up and parse through it and

include most of the lines.  I need to include an HTML file into an ASP

page, but when the page is included into my ASP page (the included HTML

file is from a different folder), the links to the pictures are relative

to the ASP page where in reality they are correctly in relevance with

the HTML page path.  I simply wanted to open it up and parse through it

and look for IMG tabs and add the folder name in to adjust for this.

Any ideas other than this that may be of help are greatly appreciated.

This HTML file is a page generated from a user base who would not be

able to go in and modify the HTML, nor can I modify the product

producing the images.  Thanks in advance.



Chris



Message #2 by "Ken Schaefer" <ken@a...> on Fri, 15 Feb 2002 17:15:11 +1100
You could use the File System Object to read in the file. Place the contents

into a variable, and then do a Replace() on it.



That said, is there any way you could get the creator of the HTML to use

_absolute_ references rather than _relative_ references, because this would

solve your problem straight away.



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Chris R. Thompson" <cthompson@n...>

Subject: [asp_web_howto] Included HTML File Parsing





Anybody know how in ASP to open a file up and parse through it and

include most of the lines.  I need to include an HTML file into an ASP

page, but when the page is included into my ASP page (the included HTML

file is from a different folder), the links to the pictures are relative

to the ASP page where in reality they are correctly in relevance with

the HTML page path.  I simply wanted to open it up and parse through it

and look for IMG tabs and add the folder name in to adjust for this.

Any ideas other than this that may be of help are greatly appreciated.

This HTML file is a page generated from a user base who would not be

able to go in and modify the HTML, nor can I modify the product

producing the images.  Thanks in advance.





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Message #3 by Greg Griffiths <greg.griffiths@g...> on Tue, 19 Feb 2002 19:30:12 +0000
Use the FSO to read all the file in and then use INSTR etc to parse the string.



At 15:12 14/02/02 -0700, you wrote:

>Anybody know how in ASP to open a file up and parse through it and

>include most of the lines.  I need to include an HTML file into an ASP

>page, but when the page is included into my ASP page (the included HTML

>file is from a different folder), the links to the pictures are relative

>to the ASP page where in reality they are correctly in relevance with

>the HTML page path.  I simply wanted to open it up and parse through it

>and look for IMG tabs and add the folder name in to adjust for this.

>Any ideas other than this that may be of help are greatly appreciated.

>This HTML file is a page generated from a user base who would not be

>able to go in and modify the HTML, nor can I modify the product

>producing the images.  Thanks in advance.

>

>Chris

>

>







  Return to Index