HTML::TreeBuilder::LibXML::Node - HTML::Element compatible API for HTML::TreeBuilder::LibXML
my $value = $node->attr('name'); my $string = $node->string_value; my $text = $node->as_text; my $t_text = $node->as_trimmed_text; my $xml = $node->as_XML; my $html = $node->as_HTML; my $tag = $node->tag; my $id = $node->id; my $clone = $node->clone; $node->delete; $node->look_down(@args); my %attr = $node->all_attr; my %attr = $node->all_external_attr; my @names = $node->all_attr_names; my @names = $node->all_external_attr_names; # HTML::TreeBuilder::XPath my @nodes = $node->findnodes($xpath); my $value = $node->findvalue($xpath); $node->isTextNode; my $child = $node->getFirstChild;
To install HTML::TreeBuilder::LibXML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::TreeBuilder::LibXML
CPAN shell
perl -MCPAN -e shell install HTML::TreeBuilder::LibXML
For more information on module installation, please visit the detailed CPAN module installation guide.