NAME

URL::Transform::using::HTML::Parser - HTML::Parse parsing of the html/xml for url transformation

SYNOPSIS

my $urlt = URL::Transform::using::HTML::Parser->new(
    'output_function'    => sub { $output .= "@_" },
    'transform_function' => sub { return (join '|', @_) },
);
$urlt->parse_file($Bin.'/data/URL-Transform-01.html');

print "and this is the output: ", $output;

DESCRIPTION

Using this module you can performs an url transformation on the HTML/XML documents.

This module is used by URL::Transform.

The url matching algorithm is taken from HTML::Parser/eg/hrefsub example script.

PROPERTIES

output_function
transform_function
parser_for

_html_parser

METHODS

new

Object constructor.

Requires:

output_function
transform_function

Optional:

parser_for

transform_function_wrapper

Wrapper for transform function that can handle special cases of url-s when hidden inside an attribute. Like meta refresh:

<meta http-equiv="Refresh" content="0;http://someserver/" />

parse_string($string)

Submit document as a string for parsing.

parse_chunk($chunk)

Submit chunk of a document for parsing.

parse_file($file_name)

Submit file for parsing.

AUTHOR

Jozef Kutej