1Parser::Style::Subs(3)User Contributed Perl DocumentationParser::Style::Subs(3)
2
3
4

NAME

6       XML::Parser::Style::Subs - glue for handling element callbacks
7

SYNOPSIS

9         use XML::Parser;
10         my $p = XML::Parser->new(Style => 'Subs', Pkg => 'MySubs');
11         $p->parsefile('foo.xml');
12
13         {
14           package MySubs;
15
16           sub foo {
17             # start of foo tag
18           }
19
20           sub foo_ {
21             # end of foo tag
22           }
23         }
24

DESCRIPTION

26       Each time an element starts, a sub by that name in the package
27       specified by the Pkg option is called with the same parameters that the
28       Start handler gets called with.
29
30       Each time an element ends, a sub with that name appended with an
31       underscore ("_"), is called with the same parameters that the End
32       handler gets called with.
33
34       Nothing special is returned by parse.
35
36
37
38perl v5.36.0                      2022-07-22            Parser::Style::Subs(3)
Impressum