Search::Tools::XML 0.01 review

Download
by rbytes.net on

Search::Tools::XML are methods for playing nice with XML and HTML. SYNOPSIS use Search::Tools::XML; my $class = 'Search::

License: Perl Artistic License
File size: 0K
Developer: Peter Karman
0 stars award from rbytes.net

Search::Tools::XML are methods for playing nice with XML and HTML.

SYNOPSIS

use Search::Tools::XML;

my $class = 'Search::Tools::XML';

my $text = 'the "quick brown" fox';

my $xml = $class->start_tag('foo');

$xml .= $class->utf8_safe( $text );

$xml .= $class->end_tag('foo');

# $xml: the "quick brown" fox

$class->escape( $xml );

# $xml: <foo>the &#34;quick brown&#34; fox</foo>

$class->unescape( $xml );

# $xml: the "quick brown" fox

my $plain = $class->no_html( $xml );

# $plain eq $text

Search::Tools::XML provides utility methods for dealing with XML and HTML. There isn't really anything new here that CPAN doesn't provide via HTML::Entities or similar modules. The difference is convenience: the most common methods you need for search apps are in one place with no extra dependencies.

NOTE: To get full UTF-8 character set from chr() you must be using Perl >= 5.8. This affects things like the unescape* methods.

Requirements:
Perl

Search::Tools::XML 0.01 keywords