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 SGML::StripParser

Instantiate a new SGML::StripParser object.


Object Methods

The following methods are defined:


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


See Also

stripsgml,

SGML::ISO8859, SGML::Parser

perl(1)


Availability

This software is part of the perlSGML package; see (http://www.oac.uci.edu/indiv/ehood/perlSGML.html)


Author

Earl Hood
ehood@medusa.acs.uci.edu
Copyright © 1997

97/09/18 14:32:49