URL::Transform::using::XML::SAX - XML::SAX parsing of the html/xml for url transformation
my $urlt = URL::Transform::using::XML::SAX->new( 'output_function' => sub { $output .= "@_" }, 'transform_function' => sub { return (join '|', @_) }, ); $urlt->parse_file($Bin.'/data/URL-Transform-01.html');
This is a helper module to set-up URL::Transform::SAX::Filter for a URL::Transform.
You can set which SAX driver will be used by:
$XML::SAX::ParserPackage = "XML::LibXML::SAX";
See: XML::SAX::ParserFactory.
This module lacks the advanced features of URL::Transform::using::HTML::Parser like transforming the urls in the inside document elements types (CSS/JavaScript/Meta) because it was used mosty to benchmark the performance of the HTML::Parser vs XML::SAX. The HTML::Parser turned out to be much more performant.
output_function transform_function _libxml_parser
Object constructor.
Requires:
output_function transform_function
Which are the code refs. See URL::Transform for more details/example.
Submit document as a string for parsing.
Submit file for parsing.
URL::Transform, URL::Transform::SAX::Filter
Jozef Kutej
To install URL::Transform, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URL::Transform
CPAN shell
perl -MCPAN -e shell install URL::Transform
For more information on module installation, please visit the detailed CPAN module installation guide.