[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-win32
Subject:    Re: extracting from html and generating sql
From:       "Samuel" <samuel () socal ! rr ! com>
Date:       2004-05-21 23:33:23
Message-ID: 017001c43f8c$02911390$5755a518 () samsystem
[Download RAW message or body]

----- Original Message ----- 
From: " ngelo M. Rigo" <angelomrigo@yahoo.com.br>
To: <win32@lists.mysql.com>
Sent: Friday, May 21, 2004 7:09 AM
Subject: extracting from html and generating sql


> I have a html file with a lot of records listed onde below each other in
this format:
>
> <Br><Br><B><A Target="_blank" Href="TITLE HERE'>Http://LINK HERE">TITLE
HERE</A></B><Br>
>   DESCRIPTION HERE.
> //two
> //blank lines
>
> I need to get the title the link and the description and generate a sql
file to insert into mysql .
>
> There is a way ? php? shel script? another?


Yes there are other ways. I assume this is for a Windows environment but I
don't know what other requirements exist for you, such as languages you can
use, but it should be possible to get to the Document Object Model (DOM),
which can be accessed using Dynamic HTML (DHTML). It might be more work to
learn how, but it will likely also be useful in the future. Assuming you do
not use C++, a good solution is Visual Basic. You could write a VB program
that has a WebBrowser control in it and then access the document. You would
browse/load the HTML then read using DHTML. You could do something similar
using scripts, but the main problem is that you would need to have a way to
wait until the page is loaded and ready, and you really need to use an event
to get notified. I don't know how to get (sink?) events using scripts
outside of an Office environment.

I have written a Microsoft Access form that gets book data from the USA
Library of Congress search pages. It uses DHTML to access the HTML data in
the search result pages.

Your sample above does not look correct (the title probably is not in the
Href the way you show) but I assume that the sample does not match the data
as far as that goes.

Well, I have written twice as much as you did in your question, so I guess I
should return the discussion to you to see how you intend to proceed.


-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/win32?unsub=mysql-win32@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic