NAME

HTML::Linear::Element - represent elements to populate HTML::Linear

VERSION

version 0.004

SYNOPSIS

use HTML::Linear::Element;
use HTML::Linear::Path;

my $el = HTML::Linear::Element->new({
    depth   => 0,
    path    => [ HTML::Linear::Path->new({ address => q(...), tag => q(...) }) ],
})

ATTRIBUTES

attributes

Element attributes.

content

Element content.

depth

Depth level of an element inside a HTML::TreeBuilder structure.

index

Index to preserve elements order.

index_map

Used for internal collision detection.

key

Stringified element representation.

path

Store representations of paths inside HTML::TreeBuilder structure (HTML::Linear::Path).

sha

Lazy Digest::SHA (256-bit) representation.

METHODS

as_string

Stringified signature of an element.

as_xpath

Build a nice XPath representation of a path inside the HTML::TreeBuilder structure.

as_hash

Linearize element as an associative array (Perl hash).

AUTHOR

Stanislaw Pusep <stas@sysd.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 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.