1
package HTML::TokeParser::Simple::Token::Declaration;
5
use vars qw/ $VERSION $REVISION /;
6
$REVISION = '$Id: Declaration.pm,v 1.2 2004/09/25 23:36:53 ovid Exp $';
8
use base 'HTML::TokeParser::Simple::Token';
10
sub is_declaration { 1 }
18
HTML::TokeParser::Simple::Token::Declaration - Token.pm declaration class.
22
use HTML::TokeParser::Simple;
23
my $p = HTML::TokeParser::Simple->new( $somefile );
25
while ( my $token = $p->get_token ) {
26
# This prints all text in an HTML doc (i.e., it strips the HTML)
27
next unless $token->is_text;
33
This is the declaration class for tokens. C<is_declaration()> will return true
34
if the token is the DTD at the top of the HTML.