.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "XML::Grove::PerlSAX 3pm" .TH XML::Grove::PerlSAX 3pm "2018-07-12" "perl v5.26.2" "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::Grove::PerlSAX \- an PerlSAX event interface for XML objects .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use XML::Grove::PerlSAX; \& \& $parser = XML::Grove::PerlSAX\->new( [OPTIONS] ); \& $result = $parser\->parse( [OPTIONS] ); \& \& # or \& $result = $xml_object\->parse( [OPTIONS] ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`XML::Grove::PerlSAX\*(C'\fR is a PerlSAX parser that generates PerlSAX events from XML::Grove objects. This man page summarizes the specific options, handlers, and properties supported by \f(CW\*(C`XML::Grove::PerlSAX\*(C'\fR; please refer to the PerlSAX standard in `\f(CW\*(C`PerlSAX.pod\*(C'\fR' for general usage information. .SH "METHODS" .IX Header "METHODS" .IP "new" 4 .IX Item "new" Creates a new parser object. Default options for parsing, described below, are passed as key-value pairs or as a single hash. Options may be changed directly in the parser object unless stated otherwise. Options passed to `\f(CW\*(C`parse()\*(C'\fR' override the default options in the parser object for the duration of the parse. .IP "parse" 4 .IX Item "parse" Parses a document. Options, described below, are passed as key-value pairs or as a single hash. Options passed to `\f(CW\*(C`parse()\*(C'\fR' override default options in the parser object. .SH "OPTIONS" .IX Header "OPTIONS" The following options are supported by \f(CW\*(C`XML::Grove::PerlSAX\*(C'\fR: .PP .Vb 3 \& Handler default handler to receive events \& DocumentHandler handler to receive document events \& Source hash containing the input source for parsing .Ve .PP If no handlers are provided then all events will be silently ignored. .PP If a single grove argument is passed to the `\f(CW\*(C`parse()\*(C'\fR' method, it is treated as if a `\f(CW\*(C`Source\*(C'\fR' option was given with a `\f(CW\*(C`Grove\*(C'\fR' parameter. .PP The `\f(CW\*(C`Source\*(C'\fR' hash may contain the following parameters: .PP .Vb 1 \& Grove The grove object used to generate parse events.. .Ve .SH "HANDLERS" .IX Header "HANDLERS" The following events are generated by \f(CW\*(C`XML::Grove::PerlSAX\*(C'\fR. XML::Grove::PerlSAX passes the corresponding grove object as it's parameter so the properties passed to the handler are those that were used to create or were assigned to the grove. Please see the docs for the parser used to create the grove for a list of properties that were provided. .SS "DocumentHandler methods" .IX Subsection "DocumentHandler methods" .IP "start_document" 4 .IX Item "start_document" Receive notification of the beginning of a document. This is called from the XML::Grove::Document object before processing any document content. .IP "end_document" 4 .IX Item "end_document" Receive notification of the end of a document. This is called from the XML::Grove::Document object after processing all document content. .IP "start_element" 4 .IX Item "start_element" Receive notification of the beginning of an element. This is called from the XML::Grove::Element object before processing any element content. .IP "end_element" 4 .IX Item "end_element" Receive notification of the end of an element. This is called from the XML::Grove::Element object after processing all element content. .IP "characters" 4 .IX Item "characters" Receive notification of character data. This is called from the XML::Grove::Characters object. .IP "processing_instruction" 4 .IX Item "processing_instruction" Receive notification of a processing instruction. This is called from the XML::Grove::PI object. .IP "comment" 4 .IX Item "comment" Receive notification of a comment. This is called from the XML::Grove::Comment object. .SH "AUTHOR" .IX Header "AUTHOR" Ken MacLeod, ken@bitsko.slc.ut.us .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1), \fIXML::Grove\fR\|(3) .PP Extensible Markup Language (\s-1XML\s0)