13 |
warn $error{type}, "\n"; |
warn $error{type}, "\n"; |
14 |
}; |
}; |
15 |
|
|
16 |
Whatpm::HTML->parse_string ($s => $doc, $onerror); |
Whatpm::HTML->parse_char_string ($s => $doc, $onerror); |
17 |
|
|
18 |
## Now, |$doc| is the DOM representation of |$s|. |
## Now, |$doc| is the DOM representation of |$s|. |
19 |
|
|
37 |
|
|
38 |
=over 4 |
=over 4 |
39 |
|
|
40 |
=item [I<$doc> =] Whatpm::HTML->parse_string (I<$s>, I<$doc>[, I<$onerror>]); |
=item [I<$doc> =] Whatpm::HTML->parse_char_string (I<$s>, I<$doc>[, I<$onerror>]); |
41 |
|
|
42 |
Parse a string I<$s> as an HTML document. |
Parse a string I<$s> as an HTML document. |
43 |
|
|
75 |
|
|
76 |
use Whatpm::HTML; |
use Whatpm::HTML; |
77 |
use Whatpm::NanoDOM; |
use Whatpm::NanoDOM; |
78 |
my $doc = Whatpm::HTML->parse_string |
my $doc = Whatpm::HTML->parse_char_string |
79 |
($s => Whatpm::NanoDOM::Document->new, $onerror); |
($s => Whatpm::NanoDOM::Document->new, $onerror); |
80 |
|
|
81 |
=back |
=back |
106 |
|
|
107 |
=head1 TO DO |
=head1 TO DO |
108 |
|
|
109 |
|
Documentation for parse_byte_string. |
110 |
|
|
111 |
Tokenizer should emit a sequence of character tokens as one token |
Tokenizer should emit a sequence of character tokens as one token |
112 |
to improve performance. |
to improve performance. |
113 |
|
|
119 |
|
|
120 |
And there are many "TODO"s and "ISSUE"s in the source code. |
And there are many "TODO"s and "ISSUE"s in the source code. |
121 |
|
|
122 |
|
=head1 DEPENDENCY |
123 |
|
|
124 |
|
This module requires L<Error>. That module is available at CPAN |
125 |
|
<http://search.cpan.org/author/SHLOMIF/Error-0.17009/lib/Error.pm>. |
126 |
|
It is also part of manakai-core distribution |
127 |
|
<http://suika.fam.cx/www/2006/manakai/>. |
128 |
|
|
129 |
=head1 SEE ALSO |
=head1 SEE ALSO |
130 |
|
|
131 |
Whatpm <http://suika.fam.cx/www/markup/html/whatpm/readme>. |
Whatpm <http://suika.fam.cx/www/markup/html/whatpm/readme>. |