Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Web::Scraper::LibXML

Name Web::Scraper::LibXML
Version
Located at /usr/share/perl5/vendor_perl
File /usr/share/perl5/vendor_perl/Web/Scraper/LibXML.pm
Is Core No
Search CPAN for this module Web::Scraper::LibXML
Documentation Web::Scraper::LibXML
Module Details Web::Scraper::LibXML

NAME

Web::Scraper::LibXML - Drop-in replacement for Web::Scraper to use LibXML


SYNOPSIS

  use Web::Scraper::LibXML;
  # same as Web::Scraper
  my $scraper = scraper { ... };


DESCRIPTION

Web::Scraper::LibXML is a drop-in replacement for Web::Scraper to use the fast libxml-based HTML tree builder, HTML::TreeBuilder::LibXML.

This is almost identical to HTML::TreeBuilder::LibXML's replace_original installer, like:

  use HTML::TreeBuilder::LibXML;
  HTML::TreeBuilder::LibXML->replace_original();

  use Web::Scraper;
  my $scraper = scraper { ... };
  # this code uses LibXML parser

which overrides HTML::TreeBuilder::XPath's new() constructor so that ALL of your code using HTML::TreeBuilder::XPath is switched to the libxml based parser.

This module, instead, gives you more control over which TreeBuilder to use, depending on the site etc.


SEE ALSO

the Web::Scraper manpage the HTML::TreeBuilder::LibXML manpage

Perl Diver brought to you by ScriptSolutions.com © 1997- 2025