XML::Handler::HTMLWriter

XML::Handler::HTMLWriter is a SAX Handler for writing HTML 4.0.
Download

XML::Handler::HTMLWriter Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Matt Sergeant
  • Publisher web site:
  • http://search.cpan.org/~msergeant/

XML::Handler::HTMLWriter Tags


XML::Handler::HTMLWriter Description

XML::Handler::HTMLWriter is a SAX Handler for writing HTML 4.0. XML::Handler::HTMLWriter is a SAX Handler for writing HTML 4.0.SYNOPSIS use XML::Handler::HTMLWriter; use XML::SAX; my $writer = XML::Handler::HTMLWriter->new(...); my $parser = XML::SAX::ParserFactory->parser(Handler => $writer); ...This module is based on the rules for outputting HTML according to http://www.w3.org/TR/xslt - the XSLT specification. It is a subclass of XML::SAX::Writer, and the usage is the same as that module.UsageFirst create a new HTMLWriter object: my $writer = XML::Handler::HTMLWriter->new(...);The ... indicates parameters to be passed in. These are all passed in using the hash syntax: Key => Value.All parameters are from XML::SAX::Writer, so please see its documentation for more details.Now pass $writer to a SAX chain:e.g. a SAX parser: my $parser = XML::SAX::ParserFactory->parser(Handler => $writer);Or a SAX filter: my $tolower = XML::Filter::ToLower->new(Handler => $writer);Or use in a SAX Machine: use XML::SAX::Machines qw(Pipeline); Pipeline( XML::Filter::XSLT->new(Source => { SystemId => 'foo.xsl' }) => XML::Handler::HTMLWriter->new )->parse_uri('foo.xml');Initiate processingXML::Handler::HTMLWriter never initiates processing itself, since it is just a recepticle for SAX events. So you have to start processing on one of the modules higher up the chain. For example in the XML::SAX parser case: $parser->parse(Source => { SystemId => "foo.xhtml" });Get the resultsResults work via the consumer interface as defined in XML::SAX::Writer. Requirements: · Perl


XML::Handler::HTMLWriter Related Software