-
-
19 Oct 2016 15:08:57 UTC
- Distribution: HTML-TreeBuilder-LibXML
- Module version: 0.26
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (4)
- Testers (1979 / 57 / 0)
- Kwalitee
Bus factor: 2- 8.45% Coverage
- License: perl_5
- Perl: v5.8.1
- Activity
24 month- Tools
- Download (21.8KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 10 contributors-
Tokuhiro Matsuno
-
Masahiro Chiba
-
kimura.hideo
-
Tatsuhiko Miyagawa
-
Perlover
-
John SJ Anderson
-
Oleg G
-
Stanislaw Pusep
-
Carlos Fernando Avila Gratz
-
Yanick Champoux
NAME
HTML::TreeBuilder::LibXML - HTML::TreeBuilder and XPath compatible interface with libxml
SYNOPSIS
use HTML::TreeBuilder::LibXML; my $tree = HTML::TreeBuilder::LibXML->new; $tree->parse($html); $tree->eof; # $tree and $node compatible to HTML::Element my @nodes = $tree->findvalue($xpath); for my $node (@nodes) { print $node->tag; my %attr = $node->all_external_attr; } HTML::TreeBuilder::LibXML->replace_original(); # replace HTML::TreeBuilder::XPath->new
DESCRIPTION
HTML::TreeBuilder::XPath is libxml based compatible interface to HTML::TreeBuilder, which could be slow for a large document.
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.
BENCHMARK
This is a benchmark result by tools/benchmark.pl
Web::Scraper: 0.26 HTML::TreeBuilder::XPath: 0.09 HTML::TreeBuilder::LibXML: 0.01_01 Rate no_libxml use_libxml no_libxml 5.45/s -- -94% use_libxml 94.3/s 1632% --
AUTHOR
Tokuhiro Matsuno <tokuhirom@gmail.com>
Tatsuhiko Miyagawa <miyagawa@cpan.org>
Masahiro Chiba
THANKS TO
woremacx++ http://d.hatena.ne.jp/woremacx/20080202/1201927162
id:dailyflower
SEE ALSO
HTML::TreeBuilder, HTML::TreeBuilder::XPath
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install HTML::TreeBuilder::LibXML, copy and paste the appropriate command in to your terminal.
cpanm HTML::TreeBuilder::LibXML
perl -MCPAN -e shell install HTML::TreeBuilder::LibXML
For more information on module installation, please visit the detailed CPAN module installation guide.