Parent Directory
|
Revision Log
++ whatpm/Whatpm/ChangeLog 11 Nov 2007 06:54:02 -0000 * HTML.pm.src (parse_byte_string): New method. (parse_char_string): New alias for |parse_string|. (main phase): Invoking "change the encoding" algorithm if desired. * HTML.pod: Updated. 2007-11-11 Wakaba <wakaba@suika.fam.cx>
| 1 | =head1 NAME |
| 2 | |
| 3 | Whatpm::HTML - An HTML Parser and Serializer |
| 4 | |
| 5 | =head1 SYNOPSIS |
| 6 | |
| 7 | use Whatpm::HTML; |
| 8 | |
| 9 | my $s = q<<!DOCTYPE html><html>...</html>>; |
| 10 | # $doc = an empty DOM |Document| object |
| 11 | my $on_error = sub { |
| 12 | my %error = @_; |
| 13 | warn $error{type}, "\n"; |
| 14 | }; |
| 15 | |
| 16 | Whatpm::HTML->parse_char_string ($s => $doc, $onerror); |
| 17 | |
| 18 | ## Now, |$doc| is the DOM representation of |$s|. |
| 19 | |
| 20 | =head1 DESCRIPTION |
| 21 | |
| 22 | The C<Whatpm::HTML> module contains HTML parser and serializer. |
| 23 | |
| 24 | The HTML parser can be used to construct the DOM tree representation |
| 25 | from an HTML document. The parsing and tree construction are done |
| 26 | as described in the Web Application 1.0 specification. |
| 27 | |
| 28 | The HTML serializer can be used to obtain the HTML document representation |
| 29 | of a DOM tree (or a tree fragment thereof). The serialization |
| 30 | is performed as described in the Web Applications 1.0 specification |
| 31 | for C<innerHTML> DOM attribute. |
| 32 | |
| 33 | This module is part of Whatpm - Perl Modules for |
| 34 | Web Hypertext Application Technologies. |
| 35 | |
| 36 |