1XML::ESISParser(3)    User Contributed Perl Documentation   XML::ESISParser(3)
2
3
4

NAME

6       XML::ESISParser - Perl SAX parser using nsgmls
7

SYNOPSIS

9        use XML::ESISParser;
10
11        $parser = XML::ESISParser->new( [OPTIONS] );
12        $result = $parser->parse( [OPTIONS] );
13
14        $result = $parser->parse($string);
15

DESCRIPTION

17       "XML::ESISParser" is a Perl SAX parser using the `nsgmls' command of
18       James Clark's SGML Parser (SP), a validating XML and SGML parser.  This
19       man page summarizes the specific options, handlers, and properties
20       supported by "XML::ESISParser"; please refer to the Perl SAX standard
21       in `"SAX.pod"' for general usage information.
22
23       "XML::ESISParser" defaults to parsing XML and has an option for parsing
24       SGML.
25
26       `"nsgmls"' source, and binaries for some platforms, is available from
27       <http://www.jclark.com/>.  `"nsgmls"' is included in both the SP and
28       Jade packages.
29

METHODS

31       new Creates a new parser object.  Default options for parsing,
32           described below, are passed as key-value pairs or as a single hash.
33           Options may be changed directly in the parser object unless stated
34           otherwise.  Options passed to `"parse()"' override the default
35           options in the parser object for the duration of the parse.
36

OPTIONS

38       The following options are supported by "XML::ESISParser":
39
40        Handler          default handler to receive events
41        DocumentHandler  handler to receive document events
42        DTDHandler       handler to receive DTD events
43        ErrorHandler     handler to receive error events
44        Source           hash containing the input source for parsing
45        IsSGML           the document to be parsed is in SGML
46
47       If no handlers are provided then all events will be silently ignored.
48
49       If a single string argument is passed to the `"parse()"' method, it is
50       treated as if a `"Source"' option was given with a `"String"'
51       parameter.
52
53       The `"Source"' hash may contain the following parameters:
54
55        ByteStream       The raw byte stream (file handle) containing the
56                         document.
57        String           A string containing the document.
58        SystemId         The system identifier (URI) of the document.
59
60       If more than one of `"ByteStream"', `"String"', or `"SystemId"', then
61       preference is given first to `"ByteStream"', then `"String"', then
62       `"SystemId"'.
63

HANDLERS

65       The following handlers and properties are supported by
66       "XML::ESISParser":
67
68   DocumentHandler methods
69       start_document
70           Receive notification of the beginning of a document.
71
72           No properties defined.
73
74       end_document
75           Receive notification of the end of a document.
76
77           No properties defined.
78
79       start_element
80           Receive notification of the beginning of an element.
81
82            Name             The element type name.
83            Attributes       A hash containing the attributes attached to the
84                             element, if any.
85            IncludedSubelement This element is an included subelement.
86            Empty            This element is declared empty.
87
88           The `"Attributes"' hash contains only string values.  The `"Empty"'
89           flag is not set for an element that merely has no content, it is
90           set only if the DTD declares it empty.
91
92           BETA: Attribute values currently do not expand SData entities into
93           entity objects, they are still in the system data notation used by
94           nsgmls (inside `|').  A future version of XML::ESISParser will also
95           convert other types of attributes into their respective objects,
96           currently just their notation or entity names are given.
97
98       end_element
99           Receive notification of the end of an element.
100
101            Name             The element type name.
102
103       characters
104           Receive notification of character data.
105
106            Data             The characters from the document.
107
108       record_end
109           Receive notification of a record end sequence.  XML applications
110           should convert this to a new-line.
111
112       processing_instruction
113           Receive notification of a processing instruction.
114
115            Target           The processing instruction target in XML.
116            Data             The processing instruction data, if any.
117
118       internal_entity_ref
119           Receive notification of a system data (SData) internal entity
120           reference.
121
122            Name             The name of the internal entity reference.
123
124       external_entity_ref
125           Receive notification of a external entity reference.
126
127            Name             The name of the external entity reference.
128
129       start_subdoc
130           Receive notification of the start of a sub document.
131
132            Name             The name of the external entity reference.
133
134       end_subdoc
135           Receive notification of the end of a sub document.
136
137            Name             The name of the external entity reference.
138
139       conforming
140           Receive notification that the document just parsed conforms to it's
141           document type declaration (DTD).
142
143           No properties defined.
144
145   DTDHandler methods
146       external_entity_decl
147           Receive notification of an external entity declaration.
148
149            Name             The entity's entity name.
150            Type             The entity's type (CDATA, NDATA, etc.)
151            SystemId         The entity's system identifier.
152            PublicId         The entity's public identifier, if any.
153            GeneratedId      Generated system identifiers, if any.
154
155       internal_entity_decl
156           Receive notification of an internal entity declaration.
157
158            Name             The entity's entity name.
159            Type             The entity's type (CDATA, NDATA, etc.)
160            Value            The entity's character value.
161
162       notation_decl
163           Receive notification of a notation declaration.
164
165            Name             The notation's name.
166            SystemId         The notation's system identifier.
167            PublicId         The notation's public identifier, if any.
168            GeneratedId      Generated system identifiers, if any.
169
170       subdoc_entity_decl
171           Receive notification of a subdocument entity declaration.
172
173            Name             The entity's entity name.
174            SystemId         The entity's system identifier.
175            PublicId         The entity's public identifier, if any.
176            GeneratedId      Generated system identifiers, if any.
177
178       external_sgml_entity_decl
179           Receive notification of an external SGML-entity declaration.
180
181            Name             The entity's entity name.
182            SystemId         The entity's system identifier.
183            PublicId         The entity's public identifier, if any.
184            GeneratedId      Generated system identifiers, if any.
185

AUTHOR

187       Ken MacLeod, ken@bitsko.slc.ut.us
188

SEE ALSO

190       perl(1), PerlSAX.pod(3)
191
192        Extensible Markup Language (XML) <http://www.w3c.org/XML/>
193        SAX 1.0: The Simple API for XML <http://www.megginson.com/SAX/>
194        SGML Parser (SP) <http://www.jclark.com/sp/>
195
196
197
198perl v5.28.1                      2003-10-21                XML::ESISParser(3)
Impressum