SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot tchoune's Avatar
    Join Date
    Jan 2004
    Location
    Québec
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    converting HTML pages into Acesss DB

    I have a huge website with books reviews. Doing the update is so long (all by hand in HTML) that I want to upgrade my website with ASP (this part is done) and with an access DB as well. Taking all the reviews one by one and putting them into Access is a very tedious job. Is there a way to take those HTML tagged reviews and put them automatically into Access? If its possible I would be very grateful if someone could pinpoint me to right ressource or tutorial to accomplish this.

    Thanks

  2. #2
    SitePoint Zealot dawgbone's Avatar
    Join Date
    Dec 2003
    Location
    Brampton
    Posts
    198
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    why not "archive"

    Instead of going through all that, just put the links to those HTML pages in your access database, and from now on use asp/access to update pages.

    It is a prett common practice, where websites link to their archives which can look old and outdated in terms of internet usage because of when they were written.

    It's a much simplier process, and it isn't at all unprofessional looking.

  3. #3
    SitePoint Zealot tchoune's Avatar
    Join Date
    Jan 2004
    Location
    Québec
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dawgbone
    why not "archive"

    Instead of going through all that, just put the links to those HTML pages in your access database, and from now on use asp/access to update pages.

    It is a prett common practice, where websites link to their archives which can look old and outdated in terms of internet usage because of when they were written.

    It's a much simplier process, and it isn't at all unprofessional looking.
    Its not really an option... I want to be able to manipulate my DB, like searching it or having reviewers own space, for that I need a DB.

    thanks for your suggestion tho.

  4. #4
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Presuming that your review pages all follow the same layout, the easiest solution would be to write a script which retrieves each review from your site (either by HTTP or even better, directly from disk), then processes the page source to extract the review text/HTML and store it in a new record in the database.

    However, this is probably beyond a beginner in ASP development, since it requires a solid understanding of regular expressions (among other relevant techniques). This may perhaps be beyond you at present - I don't know your level. (If so, you might want to pay someone do develop it for you )
    Last edited by MarcusJT; May 31, 2004 at 13:22. Reason: Corrected typo
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  5. #5
    SitePoint Zealot tchoune's Avatar
    Join Date
    Jan 2004
    Location
    Québec
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Marcus,

    am very very new

    and since its for a personal website I cant pay anyone to develop that for me. I already have a couple of people offering their free time to put the reviews into the DB but its still very long! I still can try it tho, am a fast learner, so if you can point me to where to start I might give a try.

    thanks

  6. #6
    SitePoint Guru SteveO's Avatar
    Join Date
    Jan 2003
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, first work on a simple ASP script that interfaces with Access and allows you to enter records - possibly via the querystring i.e.

    1. An html form with the fields you require such as title, isbn, review, etc. The action of the form is the ASP script. ASP script intercepts the variable=value pairs and adds the record to the database.

    2. Now make a ASP script that takes an html page and uses regular expressions to store each required piece of information in a variable. Note: This will be the hardest part.

    3. Now make a script that iterates through your site (or you feed it a list of pages) and it programatically calls your regular expression script on each page and then passes the variables to your DB script in the querystring.

    This is about the simplest way I can think of doing it off the top of my head. Quite an interesting project!


Bookmarks

Posting Permissions

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