NAME

HTML::Linear::Path - represent paths inside HTML::Tree

VERSION

version 0.001

SYNOPSIS

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),
});

ATTRIBUTES

json

Lazy JSON::XS instance.

address

Location inside HTML::TreeBuilder tree.

attributes

Element attributes.

key

Stringified path representation.

strict

Strict mode disables grouping by id, class or name attributes.

tag

Tag name.

METHODS

as_string

Build a quick & dirty string representation of a path the HTML::TreeBuilder structure.

as_xpath

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

FUNCTIONS

_quote

Quote attribute values for XPath representation.

_wrap

Help to make a fancy XPath.

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.