XML::ESISParser − Perl SAX parser using nsgmls
use XML::ESISParser;
$parser = XML::ESISParser−>new( [OPTIONS] );
$result = $parser−>parse( [OPTIONS] );
$result = $parser−>parse($string);
"XML::ESISParser" 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 "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.
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. |
The following options are supported by "XML::ESISParser":
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.
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"’, then preference is given first to ‘"ByteStream"’, then ‘"String"’, then ‘"SystemId"’.
The following handlers and properties are supported by "XML::ESISParser":
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 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.
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.
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 a 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 it’s 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.
Ken MacLeod, ken@bitsko.slc.ut.us
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/>
Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.
Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.
Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.
Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.
The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.
Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.
Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.
Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.