Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Html:treebuilder vs Html:treebuilder:xpath vs Html:treebuilder:LibXML

by Anonymous Monk
on Nov 26, 2012 at 04:25 UTC ( [id://1005548]=perlquestion: print w/replies, xml ) Need Help??

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

Can anyone pls tell me the difference between the usage of these three modules Html:treebuilder vs Html:treebuilder:xpath vs Html:treebuilder:LibXML what is the difference and for what all purpose these 3 suits better with an example? or on which scenarios we can use each one of these..? I am new to Perl so anyone pls be kind to answer my question. Thanks a lot

Replies are listed 'Best First'.
Re: Html:treebuilder vs Html:treebuilder:xpath vs Html:treebuilder:LibXML
by CountZero (Bishop) on Nov 26, 2012 at 07:34 UTC
    From their documentation:
    • HTML::TreeBuilder : Parser that builds a HTML syntax tree.
    • HTML::TreeBuilder::XPath : This module adds typical XPath methods to HTML::TreeBuilder, to make it easy to query a document.
    • HTML::TreeBuilder::LibXML : HTML::TreeBuilder::LibXML is drop-in-replacement for HTML::TreeBuilder::XPath. This module doesn't implement all of HTML::TreeBuilder and HTML::Element APIs, but enough methods are defined so modules like Web::Scraper work.
    For large documents HTML::TreeBuilder could become rather slow and then HTML::TreeBuilder::LibXML is a replacement to consider.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-29 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found