Help converting HTML to CSV

J

Jim Simpson

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
 
P

Paul Lalli

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top