Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts

    Reading data from external HTML file

    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

    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

  • #2
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If there is no guarantee that the file is a valid xml/html file, then yes, your only option is to use the filesystemobject.

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    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.
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •