XML::SAX::Machine

XML::SAX::Machine is a Perl module that can manage a collection of SAX processors.
Download

XML::SAX::Machine Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Barrie Slaymaker
  • Publisher web site:
  • http://search.cpan.org/~rbs/

XML::SAX::Machine Tags


XML::SAX::Machine Description

XML::SAX::Machine is a Perl module that can manage a collection of SAX processors. XML::SAX::Machine is a Perl module that can manage a collection of SAX processors.SYNOPSIS ## Note: See XML::SAX::Pipeline and XML::SAX::Machines first, ## this is the gory, detailed interface. use My::SAX::Machines qw( Machine ); use My::SAX::Filter2; use My::SAX::Filter3; my $filter3 = My::SAX::Filter3->new; ## A simple pipeline. My::SAX::Filter1 will be autoloaded. my $m = Machine( # # Name => Class/object => handler(s) # , , , , ); ## A parser will be created unless My::SAX::Filter1 can parse_file $m->parse_file( "foo.revml" ); my $m = Machine( , , , , , );WARNING: This API is alpha!!! It will be changing.A generic SAX machine (an instance of XML::SAX::Machine) is a container of SAX processors (referred to as "parts") connected in arbitrary ways.Each parameter to Machine() (or XML::SAX::Machine-new()>) represents one top level part of the machine. Each part has a name, a processor, and one or more handlers (usually specified by name, as shown in the SYNOPSIS).Since SAX machines may be passed in as single top level parts, you can also create nested, complex machines ($filter3 in the SYNOPSIS could be a Pipeline, for example).A SAX machines can act as a normal SAX processors by connecting them to other SAX processors: my $w = My::Writer->new(); my $m = Machine( ...., { Handler => $w } ); my $g = My::Parser->new( Handler => $w ); Requirements: · Perl


XML::SAX::Machine Related Software