---
name: "HTML::TokeParser::Simple::Token"
section: "3pm"
platform: "linux"
package: "libhtml-tokeparser-simple-perl"
version: "3.16-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/HTML::TokeParser::Simple::Token"
---

# HTML::TokeParser::Simple::Token(3pm)

Base class for "HTML::TokeParser::Simple" tokens.

## NAME

HTML::TokeParser::Simple::Token - Base class for "HTML::TokeParser::Simple" tokens.

## SYNOPSIS

```
 use HTML::TokeParser::Simple;
 my $p = HTML::TokeParser::Simple->new( $somefile );
 while ( my $token = $p->get_token ) {
     # This prints all text in an HTML doc (i.e., it strips the HTML)
     next unless $token->is_text;
     print $token->as_is;
 }
```

## DESCRIPTION

This is the base class for all returned tokens.  It should never be instantiated directly.  In fact, it will `"croak()"` if it is.

## METHODS

The following list of methods are provided by this class.  Most of these are stub methods which must be overridden in a subclass.  See  HTML::TokeParser::Simple for descriptions of these methods.

- •

  as\_is

- •

  delete\_attr

- •

  get\_attr

- •

  get\_attrseq

- •

  get\_tag

- •

  get\_token0

- •

  is\_comment

- •

  is\_declaration

- •

  is\_end\_tag

- •

  is\_pi

- •

  is\_process\_instruction

- •

  is\_start\_tag

- •

  is\_tag

- •

  is\_text

- •

  return\_attr

- •

  return\_attrseq

- •

  return\_tag

- •

  return\_text

- •

  return\_token0

- •

  rewrite\_tag

- •

  set\_attr
