.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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::ESISParser 3" .TH XML::ESISParser 3 2024-07-12 "perl v5.38.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::ESISParser \- Perl SAX parser using nsgmls .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use XML::ESISParser; \& \& $parser = XML::ESISParser\->new( [OPTIONS] ); \& $result = $parser\->parse( [OPTIONS] ); \& \& $result = $parser\->parse($string); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\f(CW\*(C`XML::ESISParser\*(C'\fR is a Perl SAX parser using the `nsgmls' command of James Clark's SGML Parser (SP), a validating XML and SGML parser. This man page summarizes the specific options, handlers, and properties supported by \f(CW\*(C`XML::ESISParser\*(C'\fR; please refer to the Perl SAX standard in `\f(CW\*(C`SAX.pod\*(C'\fR' for general usage information. .PP \&\f(CW\*(C`XML::ESISParser\*(C'\fR defaults to parsing XML and has an option for parsing SGML. .PP `\f(CW\*(C`nsgmls\*(C'\fR' source, and binaries for some platforms, is available from . `\f(CW\*(C`nsgmls\*(C'\fR' is included in both the SP and Jade packages. .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(CWparse()\fR' override the default options in the parser object for the duration of the parse. .SH OPTIONS .IX Header "OPTIONS" The following options are supported by \f(CW\*(C`XML::ESISParser\*(C'\fR: .PP .Vb 6 \& Handler default handler to receive events \& DocumentHandler handler to receive document events \& DTDHandler handler to receive DTD events \& ErrorHandler handler to receive error events \& Source hash containing the input source for parsing \& IsSGML the document to be parsed is in SGML .Ve .PP If no handlers are provided then all events will be silently ignored. .PP If a single string argument is passed to the `\f(CWparse()\fR' method, it is treated as if a `\f(CW\*(C`Source\*(C'\fR' option was given with a `\f(CW\*(C`String\*(C'\fR' parameter. .PP The `\f(CW\*(C`Source\*(C'\fR' hash may contain the following parameters: .PP .Vb 4 \& ByteStream The raw byte stream (file handle) containing the \& document. \& String A string containing the document. \& SystemId The system identifier (URI) of the document. .Ve .PP If more than one of `\f(CW\*(C`ByteStream\*(C'\fR', `\f(CW\*(C`String\*(C'\fR', or `\f(CW\*(C`SystemId\*(C'\fR', then preference is given first to `\f(CW\*(C`ByteStream\*(C'\fR', then `\f(CW\*(C`String\*(C'\fR', then `\f(CW\*(C`SystemId\*(C'\fR'. .SH HANDLERS .IX Header "HANDLERS" The following handlers and properties are supported by \&\f(CW\*(C`XML::ESISParser\*(C'\fR: .SS "DocumentHandler methods" .IX Subsection "DocumentHandler methods" .IP start_document 4 .IX Item "start_document" Receive notification of the beginning of a document. .Sp No properties defined. .IP end_document 4 .IX Item "end_document" Receive notification of the end of a document. .Sp No properties defined. .IP start_element 4 .IX Item "start_element" Receive notification of the beginning of an element. .Sp .Vb 5 \& Name The element type name. \& Attributes A hash containing the attributes attached to the \& element, if any. \& IncludedSubelement This element is an included subelement. \& Empty This element is declared empty. .Ve .Sp The `\f(CW\*(C`Attributes\*(C'\fR' hash contains only string values. The `\f(CW\*(C`Empty\*(C'\fR' flag is not set for an element that merely has no content, it is set only if the DTD declares it empty. .Sp BETA: Attribute values currently do not expand SData entities into entity objects, they are still in the system data notation used by nsgmls (inside `|'). A future version of XML::ESISParser will also convert other types of attributes into their respective objects, currently just their notation or entity names are given. .IP end_element 4 .IX Item "end_element" Receive notification of the end of an element. .Sp .Vb 1 \& Name The element type name. .Ve .IP characters 4 .IX Item "characters" Receive notification of character data. .Sp .Vb 1 \& Data The characters from the document. .Ve .IP record_end 4 .IX Item "record_end" Receive notification of a record end sequence. XML applications should convert this to a new-line. .IP processing_instruction 4 .IX Item "processing_instruction" Receive notification of a processing instruction. .Sp .Vb 2 \& Target The processing instruction target in XML. \& Data The processing instruction data, if any. .Ve .IP internal_entity_ref 4 .IX Item "internal_entity_ref" Receive notification of a system data (SData) internal entity reference. .Sp .Vb 1 \& Name The name of the internal entity reference. .Ve .IP external_entity_ref 4 .IX Item "external_entity_ref" Receive notification of a external entity reference. .Sp .Vb 1 \& Name The name of the external entity reference. .Ve .IP start_subdoc 4 .IX Item "start_subdoc" Receive notification of the start of a sub document. .Sp .Vb 1 \& Name The name of the external entity reference. .Ve .IP end_subdoc 4 .IX Item "end_subdoc" Receive notification of the end of a sub document. .Sp .Vb 1 \& Name The name of the external entity reference. .Ve .IP conforming 4 .IX Item "conforming" Receive notification that the document just parsed conforms to it's document type declaration (DTD). .Sp No properties defined. .SS "DTDHandler methods" .IX Subsection "DTDHandler methods" .IP external_entity_decl 4 .IX Item "external_entity_decl" Receive notification of an external entity declaration. .Sp .Vb 5 \& Name The entity\*(Aqs entity name. \& Type The entity\*(Aqs type (CDATA, NDATA, etc.) \& SystemId The entity\*(Aqs system identifier. \& PublicId The entity\*(Aqs public identifier, if any. \& GeneratedId Generated system identifiers, if any. .Ve .IP internal_entity_decl 4 .IX Item "internal_entity_decl" Receive notification of an internal entity declaration. .Sp .Vb 3 \& Name The entity\*(Aqs entity name. \& Type The entity\*(Aqs type (CDATA, NDATA, etc.) \& Value The entity\*(Aqs character value. .Ve .IP notation_decl 4 .IX Item "notation_decl" Receive notification of a notation declaration. .Sp .Vb 4 \& Name The notation\*(Aqs name. \& SystemId The notation\*(Aqs system identifier. \& PublicId The notation\*(Aqs public identifier, if any. \& GeneratedId Generated system identifiers, if any. .Ve .IP subdoc_entity_decl 4 .IX Item "subdoc_entity_decl" Receive notification of a subdocument entity declaration. .Sp .Vb 4 \& Name The entity\*(Aqs entity name. \& SystemId The entity\*(Aqs system identifier. \& PublicId The entity\*(Aqs public identifier, if any. \& GeneratedId Generated system identifiers, if any. .Ve .IP external_sgml_entity_decl 4 .IX Item "external_sgml_entity_decl" Receive notification of an external SGML-entity declaration. .Sp .Vb 4 \& Name The entity\*(Aqs entity name. \& SystemId The entity\*(Aqs system identifier. \& PublicId The entity\*(Aqs public identifier, if any. \& GeneratedId Generated system identifiers, if any. .Ve .SH AUTHOR .IX Header "AUTHOR" Ken MacLeod, ken@bitsko.slc.ut.us .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBperl\fR\|(1), \fBPerlSAX.pod\fR\|(3) .PP .Vb 3 \& Extensible Markup Language (XML) \& SAX 1.0: The Simple API for XML \& SGML Parser (SP) .Ve