View Full Version : Reading data from external HTML file

09-12-2005, 03:05 PM
We've got a website stats program that generates HTML report files into a folder on our server. I need to write an ASP page that rips key data out of those files and collates it into a report of its own.

The generated files aren't XHTML; in fact, I can't guarantee that they're particularly valid HTML :rolleyes:

Am I right in thinking, therefore, that I can't rely on using an XMLHTTP object to open and parse those files, and that my best/only solution is to use a FileSystemObject and some RegExp's to get at the data?

All suggestions appreciated.

cheers :)

09-13-2005, 03:25 PM
If there is no guarantee that the file is a valid xml/html file, then yes, your only option is to use the filesystemobject.

09-14-2005, 04:25 AM
Well it sounds like you're wanting to parse the files somehow.

Perhaps you still might want to consider using the XMLHTTP object as one of your alternatives although it's usually used to get data from other Web sites.

But since it's on your own server yes you could use the FileSystem object and maybe that would be your best bet.

Not sure exactly which would be best for your specific situation but just wouldn't want you to rule out options too quickly.