Help converting HTML to CSV

Discussion in 'Perl Misc' started by Jim Simpson, Jun 21, 2004.

  1. Jim Simpson

    Jim Simpson Guest

    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
     
    Jim Simpson, Jun 21, 2004
    #1
    1. Advertising

  2. Jim Simpson

    Paul Lalli Guest

    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
     
    Paul Lalli, Jun 21, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michal Mikolajczyk
    Replies:
    0
    Views:
    658
    Michal Mikolajczyk
    Feb 13, 2004
  2. Skip Montanaro
    Replies:
    0
    Views:
    722
    Skip Montanaro
    Feb 13, 2004
  3. Tintin92
    Replies:
    1
    Views:
    1,716
    Andrew Thompson
    Feb 14, 2007
  4. jliu66
    Replies:
    0
    Views:
    516
    jliu66
    Oct 19, 2007
  5. Chuck Connors

    Need help converting text to csv format

    Chuck Connors, Nov 21, 2008, in forum: Python
    Replies:
    28
    Views:
    834
Loading...

Share This Page