Need help with Parsing HTML

Discussion in 'Perl Misc' started by Danny, Apr 12, 2004.

  1. Danny

    Danny Guest

    I would like to parse an HTML file by extracting the the contents of a form.
    Like the form objects such as the values and names
    name = idnumber value = 4
    name = productname value = scooter
    there are a few forms per page to read in, I would like to store in an array
    or to a text file

    Thanks in advance
    Danny, Apr 12, 2004
    #1
    1. Advertising

  2. Danny

    Bob Walton Guest

    Danny wrote:

    > I would like to parse an HTML file by extracting the the contents of a form.
    > Like the form objects such as the values and names
    > name = idnumber value = 4
    > name = productname value = scooter
    > there are a few forms per page to read in, I would like to store in an array
    > or to a text file

    ....


    Modules are your friend. For this, check out the HTML::parser module:

    perldoc HTML::parser

    This module should already be on your hard drive.
    --
    Bob Walton
    Email: http://bwalton.com/cgi-bin/emailbob.pl
    Bob Walton, Apr 12, 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. Tom
    Replies:
    7
    Views:
    430
    William Desrochers
    Sep 9, 2004
  2. Just Another Victim of the Ambient Morality

    Need help parsing HTML with Hpricot...

    Just Another Victim of the Ambient Morality, Oct 25, 2007, in forum: Ruby
    Replies:
    3
    Views:
    121
    Mikel Lindsaar
    Oct 25, 2007
  3. Replies:
    7
    Views:
    1,337
  4. Ninja Li

    Parsing HTML with HTML::TableExtract

    Ninja Li, Nov 27, 2009, in forum: Perl Misc
    Replies:
    2
    Views:
    208
    Martien Verbruggen
    Nov 28, 2009
  5. Ninja Li

    Parsing HTML with HTML::Tree

    Ninja Li, Mar 1, 2010, in forum: Perl Misc
    Replies:
    1
    Views:
    134
    Ninja Li
    Mar 1, 2010
Loading...

Share This Page