™.. XML::Handler::Subs - Online Linux Manual PageSection : 3
Updated : 2003-10-21
Source : perl v5.10.1
Note : User Contributed Perl Documentation
NAMEXML::Handler::Subs − a PerlSAX handler base class for calling user−defined subs
SYNOPSIS use XML::Handler::Subs;
package MyHandlers;
use vars qw{ @ISA };
sub s_NAME { my ($self, $element) = @_ };
sub e_NAME { my ($self, $element) = @_ };
$self−>{Names}; # an array of names
$self−>{Nodes}; # an array of $element nodes
$handler = MyHandlers−>new();
$self−>in_element($name);
$self−>within_element($name);
DESCRIPTION\*(C`XML::Handler::Subs\*(C'\fR is a base class for PerlSAX handlers. \*(C`XML::Handler::Subs\*(C'\fR is subclassed to implement complete behavior and to add element-specific handling. Each time an element starts, a method by that name prefixed with `s_' is called with the element to be processed. Each time an element ends, a method with that name prefixed with `e_' is called. Any special characters in the element name are replaced by underscores. Subclassing XML::Handler::Subs in this way is similar to XML::Parser's Subs style. XML::Handler::Subs maintains a stack of element names, `\*(C`$self\-\*(C'\fR{Names}', and a stack of element nodes, `\f(CW\*(C`$self\-\*(C'\fR{Nodes}>' that can be used by subclasses. The current element is pushed on the stacks before calling an element-name start method and popped off the stacks after calling the element-name end method. The `\*(C`in_element()\*(C'\fR' and `\f(CW\*(C`within_element()\*(C'\fR' calls use these stacks. If the subclass implements `\*(C`start_document()\*(C'\fR', `\f(CW\*(C`end_document()\*(C'\fR', `\*(C`start_element()\*(C'\fR', and `\f(CW\*(C`end_element()\*(C'\fR', be sure to use `\*(C`SUPER::\*(C'\fR' to call the the superclass methods also. See \fIperlobj\fR\|(1) for details on SUPER::. `\*(C`SUPER::start_element()\*(C'\fR' and `\*(C`SUPER::end_element()\*(C'\fR' return 1 if an element-name method is called, they return 0 if no method was called. XML::Handler::Subs does not implement any other PerlSAX handlers. XML::Handler::Subs supports the following methods: new( OPTIONS ) A basic `\*(C`new()\*(C'\fR' method. `\f(CW\*(C`new()\*(C'\fR' takes a list of key, value pairs or a hash and creates and returns a hash with those options; the hash is blessed into the subclass. in_element($name) Returns true if `$name' is equal to the name of the innermost currently opened element. within_element($name) Returns the number of times the `$name' appears in Names.
AUTHORKen MacLeod, ken@bitsko.slc.ut.us
SEE ALSOperl (1), PerlSAX.pod (3) 0
Johanes Gumabo
Data Size : 10,089 byte
man-XML::Handler::Subs.3pmBuild : 2024-12-29, 07:25 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 260,249
Visitor ID : :
Visitor IP : 3.147.82.108 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|252|XML::Handler::Subs.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|XML::Handler::Subs.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|252|XML::Handler::Subs.3pm|41|br══─}─══|'br══─}─══
) (htmlprn|149|XML::Handler::Subs.3pm|41|'br══─}─══ |'br══─}─══
) (rof_nr_x|149|XML::Handler::Subs.3pm|51/52|\nF|.ie \nF ══─{─══. de IX
) (rof_unit_scale_px|41|XML::Handler::Subs.3pm|51/52|F|.ie \nF ══─{─══. de IX
) (rof_if|19|XML::Handler::Subs.3pm|51/52|\nF|.ie \nF ══─{─══. de IX
) (htmlprn|149|XML::Handler::Subs.3pm|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2"
) (parse_manual_page_|252|XML::Handler::Subs.3pm|57|══─}─══|.══─}─══
) (htmlprn|149|XML::Handler::Subs.3pm|57|.══─}─══ |.══─}─══
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|154|\*(C`XML::Handler::Subs\*(C'\fR is a base class for PerlSAX handlers. |\&\f(CW\*(C`XML::Handler::Subs\*(C'\fR is a base class for PerlSAX handlers.
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|155|\*(C`XML::Handler::Subs\*(C'\fR is subclassed to implement complete behavior and |\&\f(CW\*(C`XML::Handler::Subs\*(C'\fR is subclassed to implement complete behavior and
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|167|\*(C`$self\-\*(C'\fR{Names}', and a stack of element nodes, `\f(CW\*(C`$self\-\*(C'\fR{Nodes}>' |`\f(CW\*(C`$self\-\*(C'\fR{Names}', and a stack of element nodes, `\f(CW\*(C`$self\-\*(C'\fR{Nodes}>'
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|171|\*(C`in_element()\*(C'\fR' and `\f(CW\*(C`within_element()\*(C'\fR' calls use these stacks. |`\f(CW\*(C`in_element()\*(C'\fR' and `\f(CW\*(C`within_element()\*(C'\fR' calls use these stacks.
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|173|\*(C`start_document()\*(C'\fR', `\f(CW\*(C`end_document()\*(C'\fR', |If the subclass implements `\f(CW\*(C`start_document()\*(C'\fR', `\f(CW\*(C`end_document()\*(C'\fR',
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|174|\*(C`start_element()\*(C'\fR', and `\f(CW\*(C`end_element()\*(C'\fR', be sure to use |`\f(CW\*(C`start_element()\*(C'\fR', and `\f(CW\*(C`end_element()\*(C'\fR', be sure to use
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|175|\*(C`SUPER::\*(C'\fR' to call the the superclass methods also. See \fIperlobj\fR\|(1) |`\f(CW\*(C`SUPER::\*(C'\fR' to call the the superclass methods also. See \fIperlobj\fR\|(1)
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|176|\*(C`SUPER::start_element()\*(C'\fR' and |for details on \s-1SUPER::\s0. `\f(CW\*(C`SUPER::start_element()\*(C'\fR' and
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|177|\*(C`SUPER::end_element()\*(C'\fR' return 1 if an element-name method is |`\f(CW\*(C`SUPER::end_element()\*(C'\fR' return 1 if an element-name method is
) (rof_escape_sequence|91|XML::Handler::Subs.3pm|185|\*(C`new()\*(C'\fR' method. `\f(CW\*(C`new()\*(C'\fR' takes a list of key, value |A basic `\f(CW\*(C`new()\*(C'\fR' method. `\f(CW\*(C`new()\*(C'\fR' takes a list of key, value
)