Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Core module to parse html

by Anonymous Monk
on Feb 04, 2015 at 23:16 UTC ( [id://1115584]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi I need to parse html document.
Is there a module that provides subroutines to find element by id or class or its name?
And I would like to use core modules if possible

Replies are listed 'Best First'.
Re: Core module to parse html
by hippo (Bishop) on Feb 04, 2015 at 23:35 UTC

    It isn't a core module, but I would probably start by considering HTML::DOM for this since it has handy methods like getElementById, getElementsByName and getElementsByClassName which pretty much covers your spec here.

Re: Core module to parse html
by Anonymous Monk on Feb 04, 2015 at 23:23 UTC
Re: Core module to parse html
by zwon (Abbot) on Feb 05, 2015 at 21:37 UTC
    I recommend you to try Mojo::DOM. It allows you to use CSS selectors, you should like it if you want something similar to jQuery. It is not a core module though.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1115584]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found