perlSGML -- SGML::StripParser

%perlSGML; ]>

## Name

SGML::StripParser - strip tags from an SGML instance

## Synopsis

        use SGML::StripParser;
        $parser = new SGML::StripParser;
        $parser->parse_data(\*STDIN);

## Description

SGML::StripParser strips SGML tags from document instances and translates entity references for special characters and character references to ASCII (or the character set specified by the set_charset method). The parse_data method is used to specify the input filehandle of the SGML document instance. By default, output will go to STDOUT, but the output filehandle can be changed by the set_outhandle method.

## Class Methods

The following class methods are defined:

- new

### new

`new SGML::StripParser`

  Instantiate a new SGML::StripParser object.

## Object Methods

The following methods are defined:

- parse_data

- set_charset
- set_html_mode
- set_ign_parm_ents
- set_inc_parm_ents
- set_outhandle

### parse_data

`$parser->parse_data(\*FILEHANDLE)`

  Process the document instance specified by FILEHANDLE.

### set_outhandle

`$parser->set_outhandle(\*FILEHANDLE)`

  Set the output filehandle to FILEHANDLE.

### set_html_mode

`$parser->set_html_mode($boolean)`

  If $boolean is a true value, anchor URLs in HTML documents will be included in the output.

### set_charset

`$parser->set_charset($charset)`

  Use $charset as the character set to use while processing. By default, ASCII is assumed, so entity references for special characters and character references are mapped to ASCII text. set_charset allows the entity references and character references to interpreted under a different character set. Only the ISO-8859 character sets (1-10) are supported.

### set_inc_parm_ents

`$parser->set_inc_parm_ents(@names)`

  Set the list of parameter entities in @names to "`INCLUDE`". This method may be useful for instances that have marked sections with parameter entity references for the status keyword.

### set_ign_parm_ents

`$parser->set_ign_parm_ents(@names)`

  Set the list of parameter entities in @names to "`IGNORE`". This method may be useful for instances that have marked sections with parameter entity references for the status keyword.

## Notes

- SGML::StripParser is derived from the SGML::Parser class. Hence, it has the same parsing capbilities and limitation of the SGML::Parser class.

## See Also

stripsgml,

SGML::ISO8859, SGML::Parser

perl(1)

&avail; &author;