~ubuntu-branches/ubuntu/wily/libhtml-tokeparser-simple-perl/wily-proposed

« back to all changes in this revision

Viewing changes to lib/HTML/TokeParser/Simple/Token/Declaration.pm

  • Committer: Bazaar Package Importer
  • Author(s): Kenneth J. Pronovici
  • Date: 2004-10-14 20:05:52 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041014200552-vufba43ketorhwzv
Tags: upstream-3.13
ImportĀ upstreamĀ versionĀ 3.13

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package HTML::TokeParser::Simple::Token::Declaration;
 
2
 
 
3
use strict;
 
4
 
 
5
use vars qw/ $VERSION $REVISION /;
 
6
$REVISION = '$Id: Declaration.pm,v 1.2 2004/09/25 23:36:53 ovid Exp $';
 
7
$VERSION  = '1.0';
 
8
use base 'HTML::TokeParser::Simple::Token';
 
9
 
 
10
sub is_declaration { 1 }
 
11
 
 
12
1;
 
13
 
 
14
__END__
 
15
 
 
16
=head1 NAME
 
17
 
 
18
HTML::TokeParser::Simple::Token::Declaration - Token.pm declaration class.
 
19
 
 
20
=head1 SYNOPSIS
 
21
 
 
22
 use HTML::TokeParser::Simple;
 
23
 my $p = HTML::TokeParser::Simple->new( $somefile );
 
24
 
 
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;
 
28
     print $token->as_is;
 
29
 }
 
30
 
 
31
=head1 DESCRIPTION
 
32
 
 
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.