SGML::SData - an SGML, XML, or HTML document SData replacement
$sdata = SGML::SData->new ($replacement[, $entity_name]); $name = $sdata->name; $data = $sdata->data; $sdata->as_string([$context, ...]); $sdata->iter; $sdata->accept($visitor, ...); $sdata->accept_gi($visitor, ...); $sdata->children_accept($visitor, ...); $sdata->children_accept_gi($visitor, ...);
An SGML::SData contains the entity name and replacement value of a character entity reference.
SGML::SData
$sdata->name returns the entity name of the SData object.
$sdata->name
$sdata->data returns the data of the SData object.
$sdata->data
The Perl module Text::EntityMap can be used to map commonly used character entity sets to common output formats.
Text::EntityMap
$sdata->as_string([$context, ...]) returns data surrounded by brackets (`[ ... ]') unless $context->{sdata_mapper} is defined, in which case it returns the result of calling the sdata_mapper subroutine with data and the remaining arguments. The actual implementation is:
$sdata->as_string([$context, ...])
data
$context->{sdata_mapper}
sdata_mapper
&{$context->{sdata_mapper}} ($self->data, @_);
$sdata->iter returns an iterator for the sdata object, see Class::Visitor for details.
$sdata->iter
Class::Visitor
$sdata->accept($visitor[, ...]) issues a call back to $visitor->visit_SGML_SData($sdata[, ...]). See examples visitor.pl and simple-dump.pl for more information.
$sdata->accept($visitor[, ...])
$visitor->visit_SGML_SData($sdata[, ...])
visitor.pl
simple-dump.pl
$sdata->accept_gi($visitor[, ...]) is implemented as a synonym for accept.
$sdata->accept_gi($visitor[, ...])
accept
children_accept and children_accept_gi do nothing.
children_accept
children_accept_gi
Ken MacLeod, ken@bitsko.slc.ut.us
perl(1), SGML::Grove(3), Text::EntityMap(3), SGML::Element(3), SGML::PI(3), Class::Visitor(3).
To install SGML::Grove, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SGML::Grove
CPAN shell
perl -MCPAN -e shell install SGML::Grove
For more information on module installation, please visit the detailed CPAN module installation guide.