XML::ESISParser(3)
πΈ NAME πΈ
Bestie, welcome to XML::ESISParser(3) from the User Contributed Perl Documentation crew π«Ά. XML::ESISParser β Perl SAX parser using nsgmls.
π¦ SYNOPSIS π¦
Copy-paste this exactly, no cap:
use XML::ESISParser;
$parser = XML::ESISParser->new( [OPTIONS] );
$result = $parser->parse( [OPTIONS] );
$result = $parser->parse($string);
π DESCRIPTION π
Okay so XML::ESISParser is a Perl SAX parser using the nsgmls command of James Clark's SGML Parser (SP), which is a validating XML and SGML parser. No cap, it validates. This man page summarizes the specific options, handlers, and properties supported by XML::ESISParser; please refer to the Perl SAX standard in SAX.pod for general usage information.
XML::ESISParser defaults to parsing XML and has an option for parsing SGML.
nsgmls source, and binaries for some platforms, is available from http://www.jclark.com/. nsgmls is included in both the SP and Jade packages. Obsessed with a parser that ships in multiple packages? Same π¦.
β¨ METHODS β¨
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 parse() override the default options in the parser object for the duration of the parse. It's giving very flexible, honestly π
.
π₯ OPTIONS π₯
The following options are supported by XML::ESISParser β keep these names exact, bestie:
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.
If no handlers are provided then all events will be silently ignored. Quiet king behavior, honestly.
If a single string argument is passed to the parse() method, it is treated as if a Source option was given with a String parameter.
The Source hash may contain the following parameters:
ByteStreamβ The raw byte stream (file handle) containing the document.Stringβ A string containing the document.SystemIdβ The system identifier (URI) of the document.
If more than one of ByteStream, String, or SystemId is in play, then preference is given first to ByteStream, then String, then SystemId. That's the priority order, periodt.
π HANDLERS π
The following handlers and properties are supported by XML::ESISParser. Get your notebook out π.
π DocumentHandler methods π
start_document
Receive notification of the beginning of a document.
No properties defined.
end_document
Receive notification of the end of a document.
No properties defined.
start_element
Receive notification of the beginning of an element.
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.
The Attributes hash contains only string values. The Empty flag is not set for an element that merely has no content; it is set only if the DTD declares it empty.
BETA: Attribute values currently do not expand SData entities into entity objects, they are still in the system data notation used bynsgmls(inside|). A future version ofXML::ESISParserwill also convert other types of attributes into their respective objects; currently just their notation or entity names are given.
end_element
Receive notification of the end of an element.
Nameβ The element type name.
characters
Receive notification of character data.
Dataβ The characters from the document.
record_end
Receive notification of a record end sequence. XML applications should convert this to a new-line. Yes, literally convert it π.
processing_instruction
Receive notification of a processing instruction.
Targetβ The processing instruction target in XML.Dataβ The processing instruction data, if any.
internal_entity_ref
Receive notification of a system data (SData) internal entity reference.
Nameβ The name of the internal entity reference.
external_entity_ref
Receive notification of an external entity reference.
Nameβ The name of the external entity reference.
start_subdoc
Receive notification of the start of a sub document.
Nameβ The name of the external entity reference.
end_subdoc
Receive notification of the end of a sub document.
Nameβ The name of the external entity reference.
conforming
Receive notification that the document just parsed conforms to its document type declaration (DTD).
No properties defined.
π DTDHandler methods π
external_entity_decl
Receive notification of an external entity declaration.
Nameβ The entity's entity name.Typeβ The entity's type (CDATA, NDATA, etc.)SystemIdβ The entity's system identifier.PublicIdβ The entity's public identifier, if any.GeneratedIdβ Generated system identifiers, if any.
internal_entity_decl
Receive notification of an internal entity declaration.
Nameβ The entity's entity name.Typeβ The entity's type (CDATA, NDATA, etc.)Valueβ The entity's character value.
notation_decl
Receive notification of a notation declaration.
Nameβ The notation's name.SystemIdβ The notation's system identifier.PublicIdβ The notation's public identifier, if any.GeneratedIdβ Generated system identifiers, if any.
subdoc_entity_decl
Receive notification of a subdocument entity declaration.
Nameβ The entity's entity name.SystemIdβ The entity's system identifier.PublicIdβ The entity's public identifier, if any.GeneratedIdβ Generated system identifiers, if any.
external_sgml_entity_decl
Receive notification of an external SGML-entity declaration.
Nameβ The entity's entity name.SystemIdβ The entity's system identifier.PublicIdβ The entity's public identifier, if any.GeneratedIdβ Generated system identifiers, if any.
π«Ά AUTHOR π«Ά
Ken MacLeod, ken@bitsko.slc.ut.us β iconic behavior.
π SEE ALSO π
Go peek at these, bestie:
perl(1),PerlSAX.pod(3)- Extensible Markup Language (XML) β
<http://www.w3c.org/XML/> - SAX 1.0: The Simple API for XML β
<http://www.megginson.com/SAX/> - SGML Parser (SP) β
<http://www.jclark.com/sp/>
Okay that's the whole page, bestie. This gorgeous manual came from perl v5.42.0, dated 2024-03-04, and it's XML::ESISParser(3) forever ππ«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-libxml-perl 0.08-160000.2.2 Β· Artistic-1.0 OR GPL-2.0-or-later
- opensuse-leap 16.0: perl-libxml-perl 0.08-160000.2.2 Β· Artistic-1.0 OR GPL-2.0-or-later
- opensuse-leap 16.0: perl-libxml-perl 0.08-160000.2.2 Β· Artistic-1.0 OR GPL-2.0-or-later
- opensuse-leap 16.0: perl-libxml-perl 0.08-160000.2.2 Β· Artistic-1.0 OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms