How do I convert html files into database data?

Results 1 to 2 of 2

Thread: How do I convert html files into database data?

  1. #1
    Yozza Guest

    Default How do I convert html files into database data?

    We are converting our static html site of over a 1000 pages into a database driven site,driven by SQL2000 and ASP. What is the best way to extract information from our html files such as titles, headings, metatags and image uri&#039;s so that they might fill in table fields like title, keywords, headings?<BR><BR>Our existing html is well structured, by this I mean, the first heading will be enclosed in H1 tags, the second in a H2 tag. <BR><BR>So I am looking to write a script which searches for the first H1 tag it comes across, and inserts that into our database as a title. The first paragraph should become the description field, etc. Links within the html will also need to point to the correct page.<BR><BR>Ideally I would like a product that does this, but I can&#039;t seem to find anything which fills this gap.<BR><BR>Thanks alot

  2. #2
    Join Date
    Dec 1969

    Default RE: How do I convert html files into database data

    I believe there is an article someplace (on 4 guys or another resource) that tells how to modify text files, this can be manipulated to add the data you are looking for into a database instead of editing the text file...<BR><BR>Here I found it...<BR><BR><BR>Go there and read that. The script on that page can easily be modified to insert the found text into a database. It pages through the file looking for tags and once it finds the tags, it is currently set up to do something with the tag, and page the text back to the file...<BR><BR>The script would take some modifications to remove the write-re-write functionality, but it is the basic idea that will help you with your project.<BR><BR>Good luck.<BR>-- Whol

Posting Permissions

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