77 lines
1.5 KiB
HTML
77 lines
1.5 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Parser::Style::Subs</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Parser::Style::Subs</H1>
|
|
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2019-10-03<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
XML::Parser::Style::Subs - glue for handling element callbacks
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
use XML::Parser;
|
|
my $p = XML::Parser->new(Style => 'Subs', Pkg => 'MySubs');
|
|
$p->parsefile('foo.xml');
|
|
|
|
{
|
|
package MySubs;
|
|
|
|
sub foo {
|
|
# start of foo tag
|
|
}
|
|
|
|
sub foo_ {
|
|
# end of foo tag
|
|
}
|
|
}
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
Each time an element starts, a sub by that name in the package specified
|
|
by the Pkg option is called with the same parameters that the Start
|
|
handler gets called with.
|
|
<P>
|
|
|
|
Each time an element ends, a sub with that name appended with an underscore
|
|
(``_''), is called with the same parameters that the End handler gets called
|
|
with.
|
|
<P>
|
|
|
|
Nothing special is returned by parse.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:01 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|