|
Hello,
I have a website with html tables that I want to put into an access database or any database for rthat matter. Can anyone help me with that?
Thanks
ijared
|
|
|
Do other values go to your database?
|
|
|
Well there are two approaches to do this.
1.HTML::Parser can be used which can be used to crawl throgh the HTML tags extracting the data from in between the tags.
or
2.Using Regexes
In Both approaches a carefull study of the pattern of the HTML tags used in the HTML form needs to be done to write the code.These types of programs cannot be generic(that is wont work for any web page) but would be specific to the HTML web page in question.
Cheers
Alcazar.
|
|
|
Give every value in your table data '<td>' a name and use asp to extract data from table to access database e.g
<%
Username=Request.Form("username")
%>
|
|
|
What I am talking about is a table in an html page like below and I want to put the data in the table to an access database:
<CENTER> Saute onions in olive oil for five minutes or until tender.
Add spices and saute for 2 minutes. Stir in vinegar and sugars,
then simmer, partly covered for 15 minutes.</CENTER>
<CENTER> </CENTER>
=========================================================
This is the table
====================================================
<CENTER><TABLE BORDER=0 COLS=2 WIDTH="80%" BGCOLOR="#FFFFFF" >
<TR>
<TD><B>4 lb</B> Slightly
under ripe peaches
<BR><B>3 c</B> Sliced
onions
<BR><B>1/3 c</B> Olive oil
<BR><B>1 tb</B> Turmeric
<BR><B>1 tb</B> Ground
cumin
<BR><B>2 ts</B> Minced
garlic
<BR><B>1 ts</B> Minced
ginger
<BR><B>1 ts</B> Dried
red pepper
<BR><B>1/2 ts</B> Pepper
<BR><B>1/2 ts</B> Ground cardamom
<BR><B>1/2 ts</B> Dry mustard
<BR><B>1/4 ts</B> Nutmeg
<BR><B>1/4 ts</B> Ground cloves.
<BR><B>2 c</B>
White wine vinegar
<BR><B>2/3 c</B> Firmly packed
brown sugar
<BR><B>2/3 c</B> White sugar </TD>
<TD><B>Serves: 1</B>
<P><B>Blanch</B> peaches slightly in boiling water for 1 minute.
<B>Drain, peel pit and slice</B>.
<BR><B>Add</B> to onion mixture and simmer just until tender.
<BR><B>Transfer</B> with slotted spoon to sterilized mason jar.
<BR><B>Reduce</B> syrup over high heat to 1 1/2 cups.
<BR><B>Add</B> slowly to jars to almost cover fruit.
<BR><B>Stir</B>.
<BR><B>Fill</B> jars slowly with syrup, cap loosely and cool.
<BR><B>Tighten</B> caps and let stand in dark place at least 2 weeks.
<BR>
<BR>
<BR>
<BR>
<BR>
<BR> </TD>
</TR>
</TABLE></CENTER>
|
|
|
Thast what I told earlier.Thats exactly what HTML::Parser can do for you...It will pick up data from in between the tags and put in your database.
Reagrds,
Sumit
|
|
|
|
|
|
|
// |