NAME
SGML::Grove - an SGML, XML, or HTML document
SYNOPSIS
use SGML::Grove;
$grove = A::GroveBuilder->new ($sysid);
$root = $grove->root;
$errors = $grove->errors;
$entities = $grove->entities;
$notations = $grove->notations;
$grove->as_string([$context, ...]);
$grove->iter;
$grove->accept($visitor, ...);
$grove->accept_gi($visitor, ...);
$grove->children_accept($visitor, ...);
$grove->children_accept_gi($visitor, ...);
DESCRIPTION
SGML::Grove
represents a loaded document instance returned from a grove building or parsing module, i.e. for SGML documents this may be SGML::SPGroveBuilder. The returned grove contains the root, or top, element of the document and an array of any warnings or errors that may have been generated while parsing the document.
$grove->root
returns the SGML::Element
of the outermost element of the document.
$grove->errors
returns a reference to an array containing any errors generated while parsing the document.
$grove->entities
returns a reference to a hash containing any entities referenced in this grove (as opposed to entities that may have been declared but not used).
$grove->notations
returns a reference to an array containing any notations referenced in this grove.
$grove->as_string
returns the entire grove as a string, possibly modified by $context
. See SGML::SData and SGML::PI for more detail.
$grove-
iter> returns an iterator for the grove object, see Class::Visitor
for details.
$grove->accept($visitor[, ...])
issues a call back to $visitor->visit_SGML_Grove($element[, ...])
. See examples visitor.pl
and simple-dump.pl
for more information.
$grove->accept_gi($visitor[, ...])
is implemented as a synonym for accept
.
children_accept
and children_accept_gi
call accept
and accept_gi
, respectively, on the root element.
AUTHOR
Ken MacLeod, ken@bitsko.slc.ut.us
SEE ALSO
perl(1), Text::EntityMap(3), SGML::Element(3), SGML::SData(3), SGML::PI(3), Class::Visitor(3). <http://www.jclark.com/>