1Web::Scraper::LibXML(3pUms)er Contributed Perl DocumentatWieobn::Scraper::LibXML(3pm)
2
3
4
6 Web::Scraper::LibXML - Drop-in replacement for Web::Scraper to use
7 LibXML
8
10 use Web::Scraper::LibXML;
11
12 # same as Web::Scraper
13 my $scraper = scraper { ... };
14
16 Web::Scraper::LibXML is a drop-in replacement for Web::Scraper to use
17 the fast libxml-based HTML tree builder, HTML::TreeBuilder::LibXML.
18
19 This is almost identical to HTML::TreeBuilder::LibXML's
20 replace_original installer, like:
21
22 use HTML::TreeBuilder::LibXML;
23 HTML::TreeBuilder::LibXML->replace_original();
24
25 use Web::Scraper;
26 my $scraper = scraper { ... };
27 # this code uses LibXML parser
28
29 which overrides HTML::TreeBuilder::XPath's new() constructor so that
30 ALL of your code using HTML::TreeBuilder::XPath is switched to the
31 libxml based parser.
32
33 This module, instead, gives you more control over which TreeBuilder to
34 use, depending on the site etc.
35
37 Web::Scraper HTML::TreeBuilder::LibXML
38
39
40
41perl v5.36.0 2022-07-22 Web::Scraper::LibXML(3pm)