.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" .\" 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" '' '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 turned on, 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. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "XML::ESISParser 3pm" .TH XML::ESISParser 3pm "2003-10-21" "perl v5.10.1" "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 \s-1SAX\s0 parser using the `nsgmls' command of James Clark's \s-1SGML\s0 Parser (\s-1SP\s0), a validating \s-1XML\s0 and \s-1SGML\s0 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 \&\s-1SAX\s0 standard in `\f(CW\*(C`SAX.pod\*(C'\fR' for general usage information. .PP \&\f(CW\*(C`XML::ESISParser\*(C'\fR defaults to parsing \s-1XML\s0 and has an option for parsing \s-1SGML\s0. .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 \s-1SP\s0 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(CW\*(C`parse()\*(C'\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(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`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 \s-1DTD\s0 declares it empty. .Sp \&\s-1BETA:\s0 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. \s-1XML\s0 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 (\s-1DTD\s0). .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" \&\fIperl\fR\|(1), \fIPerlSAX.pod\fR\|(3) .PP .Vb 3 \& Extensible Markup Language (XML) \& SAX 1.0: The Simple API for XML \& SGML Parser (SP) .Ve