.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "XML::SAX::Tap 3pm" .TH XML::SAX::Tap 3pm "2022-06-28" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" XML::SAX::Tap \- Tap a pipeline of SAX processors .SH "VERSION" .IX Header "VERSION" version 0.46 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use XML::SAX::Machines qw( Pipeline Tap ) ; \& \& my $m = Pipeline( \& "UpstreamFilter", \& Tap( "My::Reformatter", \e*STDERR ), \& "DownstreamFilter", \& ); \& \& my $m = Pipeline( \& "UpstreamFilter", \& Tap( "| xmllint \-\-format \-" ), \& "DownstreamFilter", \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" XML::SAX::Tap is a \s-1SAX\s0 machine that passes each event it receives on to a brach handler and then on down to it's main handler. This allows debugging output, logging output, validators, and other processors (and machines, of course) to be placed in a pipeline. This differs from XML::Filter::Tee, XML::Filter::SAXT and XML::SAX::Distributer in that a tap is also a pipeline; it contains the processoring that handles the tap. .PP It's like XML::Filter::Tee in that the events are not buffered; each event is sent first to the tap, and then to the branch (this is different from XML::SAX::Dispatcher, which buffers the events). .PP It's like XML::SAX::Pipeline in that it contains a series of processors in a pipeline; these comprise the \*(L"tapping\*(R" processors: .PP .Vb 12 \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ \& | Tap instance | \& | | \& | Intake | \& | +\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ | \& upstream \-\-+\->| Tee |\-\-\->| Stage_0 |\-\-...\-\->| Stage_N | | \& | +\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-+ | \& | \e | \& | \e Exhaust | \& | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-> downstream \& | | \& +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .Ve .PP The events are not copied, since they may be data structures that are difficult or impossibly to copy properly, like parts of a C\-based \s-1DOM\s0 implementation. .PP Events go to the tap first so that you can validate events using a tap that throws exceptions and they will be acted on before the tap's handler sees them. .PP This machine has no \f(CW\*(C`Exhaust\*(C'\fR port (see XML::SAX::Machine for details about \f(CW\*(C`Intake\*(C'\fR and \f(CW\*(C`Exhaust\*(C'\fR ports). .SH "NAME" XML::SAX::Tap \- Tap a pipeline of SAX processors .SH "METHODS" .IX Header "METHODS" .IP "new" 4 .IX Item "new" .Vb 1 \& my $tap = XML::SAX::Tap\->new( @tap_processors, \e%options ); .Ve .SH "AUTHOR" .IX Header "AUTHOR" .Vb 1 \& Barrie Slaymaker .Ve .SH "COPYRIGHT" .IX Header "COPYRIGHT" .Vb 1 \& Copyright 2002, Barrie Slaymaker, All Rights Reserved .Ve .PP You may use this module under the terms of the Artistic, \s-1GNU\s0 Public, or \&\s-1BSD\s0 licenses, as you choose. .SH "AUTHORS" .IX Header "AUTHORS" .IP "\(bu" 4 Barry Slaymaker .IP "\(bu" 4 Chris Prather .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2013 by Barry Slaymaker. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.