CONTENTS

NAME

XML::SAX::ParserFactory - Obtain a SAX parser

SYNOPSIS

use XML::SAX::ParserFactory;
use XML::SAX::XYZHandler;
my $handler = XML::SAX::XYZHandler->new();
my $p = XML::SAX::ParserFactory->parser(Handler => $handler);
$p->parse_uri("foo.xml");
# or $p->parse_string("<foo/>") or $p->parse_file($fh);

DESCRIPTION

XML::SAX::ParserFactory is a factory class for providing an application with a Perl SAX2 XML parser. It is akin to DBI - a front end for other parser classes. Each new SAX2 parser installed will register itself with XML::SAX, and then it will become available to all applications that use XML::SAX::ParserFactory to obtain a SAX parser.

Unlike DBI however, XML/SAX parsers almost all work alike (especially if they subclass XML::SAX::Base, as they should), so rather than specifying the parser you want in the call to parser(), XML::SAX has several ways to automatically choose which parser to use:

AUTHOR

Matt Sergeant, matt@sergeant.org

LICENSE

This is free software, you may use it and distribute it under the same terms as Perl itself.