HTML::Linear::Path - represent paths inside HTML::Tree
version 0.019
use HTML::Linear::Path; my $level = HTML::Linear::Path->new({ address => q(0.1.1.3.0), attributes => { id => q(li1), }, strict => 0, tag => q(li), });
Lazy JSON instance.
Location inside HTML::TreeBuilder tree.
Element attributes.
Stringified path representation.
Strict mode disables grouping by tags/attributes listed in "%HTML::Linear::Path::groupby".
Tag name.
Build a quick & dirty string representation of a path the HTML::TreeBuilder structure.
Build a nice XPath representation of a path inside the HTML::TreeBuilder structure.
Return tag weight.
Quote attribute values for XPath representation.
Help to make a fancy XPath.
Checks if $tag/$attribute tuple matches "%HTML::Linear::Path::groupby".
$tag
$attribute
Tags/attributes significant as XPath filters. @class/@id are the most obvious; we also use meta/@property, input/@name and several others.
@class
@id
meta/@property
input/@name
Table of HTML tag weights. Borrowed from TexNet32 - WWW filters.
Wrap XPath components to produce fancy syntax highlight.
The format is:
( array => ['' => ''], attribute => ['' => ''], equal => ['' => ''], number => ['' => ''], separator => ['' => ''], sigil => ['' => ''], tag => ['' => ''], value => ['' => ''], )
There are several pre-defined schemes at HTML::Linear::Path::Colors.
Stanislaw Pusep <stas@sysd.org>
This software is copyright (c) 2014 by Stanislaw Pusep.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install HTML::Untemplate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Untemplate
CPAN shell
perl -MCPAN -e shell install HTML::Untemplate
For more information on module installation, please visit the detailed CPAN module installation guide.