Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Help converting HTML to CSV

Reply
Thread Tools

Help converting HTML to CSV

 
 
Jim Simpson
Guest
Posts: n/a
 
      06-21-2004
I need to convert an HTML file to a tab delimited or CSV file. Can someone
who has done this give me some pointers please.

Thanks

Jim


 
Reply With Quote
 
 
 
 
Paul Lalli
Guest
Posts: n/a
 
      06-21-2004
On Mon, 21 Jun 2004, Jim Simpson wrote:

> I need to convert an HTML file to a tab delimited or CSV file. Can someone
> who has done this give me some pointers please.


It would be helpful if you would give a more descriptive problem
statement. What kind of conversion are you looking for? As in, what are
the fields of the CSV file, and where do they come from? Are you trying
to tokenize the HTML document so that every tag is a field? Are you
trying to parse it so that every pair of open-close tags will contain the
included tags as fields?

My *guess* is that you are trying to copy an HTML table's data into a CSV
file. This is only a guess of course, because you haven't been explicit
in what you want to do. For this task, I would recommend you look at the
following modules, available from search.cpan.org:

Text::CSV_XS
HTML::TableExtract

Read the documentations for those, and make an attempt. If you run into
problems, let us know.

Paul Lalli
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help converting text to csv format Chuck Connors Python 28 11-23-2008 11:13 PM
read and write csv file using csv module jliu66 Python 0 10-19-2007 03:12 PM
How to move data from a CSV file to a JTable, and from a JTable to a CSV file ? Tintin92 Java 1 02-14-2007 06:51 PM
Re: csv writerow creates double spaced excel csv files Skip Montanaro Python 0 02-13-2004 08:50 PM
csv writerow creates double spaced excel csv files Michal Mikolajczyk Python 0 02-13-2004 08:38 PM



Advertisments