{
    "content": [
        {
            "type": "text",
            "text": "# XML::Parser::PerlSAX (info)\n\n## NAME\n\nXML::Parser::PerlSAX - Perl SAX parser using XML::Parser\n\n## SYNOPSIS\n\nuse XML::Parser::PerlSAX;\n$parser = XML::Parser::PerlSAX->new( [OPTIONS] );\n$result = $parser->parse( [OPTIONS] );\n$result = $parser->parse($string);\n\n## DESCRIPTION\n\n\"XML::Parser::PerlSAX\" is a PerlSAX parser using the XML::Parser\nmodule.  This man page summarizes the specific options, handlers, and\nproperties supported by \"XML::Parser::PerlSAX\"; please refer to the\nPerlSAX standard in `\"PerlSAX.pod\"' for general usage information.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS**\n- **OPTIONS**\n- **HANDLERS**\n- **AUTHOR**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::Parser::PerlSAX",
        "section": "",
        "mode": "info",
        "summary": "XML::Parser::PerlSAX - Perl SAX parser using XML::Parser",
        "synopsis": "use XML::Parser::PerlSAX;\n$parser = XML::Parser::PerlSAX->new( [OPTIONS] );\n$result = $parser->parse( [OPTIONS] );\n$result = $parser->parse($string);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "perl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/perl/1/json"
            },
            {
                "name": "PerlSAX.pod",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/PerlSAX.pod/3/json"
            },
            {
                "name": "PerlSAX",
                "section": "3pm",
                "url": "https://www.chedong.com/phpMan.php/man/PerlSAX/3pm/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 30,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 33,
                "subsections": []
            },
            {
                "name": "HANDLERS",
                "lines": 188,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::Parser::PerlSAX - Perl SAX parser using XML::Parser\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use XML::Parser::PerlSAX;\n\n$parser = XML::Parser::PerlSAX->new( [OPTIONS] );\n$result = $parser->parse( [OPTIONS] );\n\n$result = $parser->parse($string);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"XML::Parser::PerlSAX\" is a PerlSAX parser using the XML::Parser\nmodule.  This man page summarizes the specific options, handlers, and\nproperties supported by \"XML::Parser::PerlSAX\"; please refer to the\nPerlSAX standard in `\"PerlSAX.pod\"' for general usage information.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new Creates a new parser object.  Default options for parsing,\ndescribed below, are passed as key-value pairs or as a single hash.\nOptions may be changed directly in the parser object unless stated\notherwise.  Options passed to `\"parse()\"' override the default\noptions in the parser object for the duration of the parse.\n\nparse\nParses a document.  Options, described below, are passed as key-\nvalue pairs or as a single hash.  Options passed to `\"parse()\"'\noverride default options in the parser object.\n\nlocation\nReturns the location as a hash:\n\nColumnNumber    The column number of the parse.\nLineNumber      The line number of the parse.\nBytePosition    The current byte position of the parse.\nPublicId        A string containing the public identifier, or undef\nif none is available.\nSystemId        A string containing the system identifier, or undef\nif none is available.\nBase            The current value of the base for resolving relative\nURIs.\n\nALPHA WARNING: The `\"SystemId\"' and `\"PublicId\"' properties\nreturned are the system and public identifiers of the document\npassed to `\"parse()\"', not the identifiers of the currently parsing\nexternal entity.  The column, line, and byte positions are of the\ncurrent entity being parsed.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "The following options are supported by \"XML::Parser::PerlSAX\":\n\nHandler          default handler to receive events\nDocumentHandler  handler to receive document events\nDTDHandler       handler to receive DTD events\nErrorHandler     handler to receive error events\nEntityResolver   handler to resolve entities\nLocale           locale to provide localisation for errors\nSource           hash containing the input source for parsing\nUseAttributeOrder set to true to provide AttributeOrder and Defaulted\nproperties in `startelement()'\n\nIf no handlers are provided then all events will be silently ignored,\nexcept for `\"fatalerror()\"' which will cause a `\"die()\"' to be called\nafter calling `\"enddocument()\"'.\n\nIf a single string argument is passed to the `\"parse()\"' method, it is\ntreated as if a `\"Source\"' option was given with a `\"String\"'\nparameter.\n\nThe `\"Source\"' hash may contain the following parameters:\n\nByteStream       The raw byte stream (file handle) containing the\ndocument.\nString           A string containing the document.\nSystemId         The system identifier (URI) of the document.\nPublicId         The public identifier.\nEncoding         A string describing the character encoding.\n\nIf more than one of `\"ByteStream\"', `\"String\"', or `\"SystemId\"', then\npreference is given first to `\"ByteStream\"', then `\"String\"', then\n`\"SystemId\"'.\n",
                "subsections": []
            },
            "HANDLERS": {
                "content": "The following handlers and properties are supported by\n\"XML::Parser::PerlSAX\":\n\nDocumentHandler methods\nstartdocument\nReceive notification of the beginning of a document.\n\nNo properties defined.\n\nenddocument\nReceive notification of the end of a document.\n\nNo properties defined.\n\nstartelement\nReceive notification of the beginning of an element.\n\nName             The element type name.\nAttributes       A hash containing the attributes attached to the\nelement, if any.\n\nThe `\"Attributes\"' hash contains only string values.\n\nIf the `\"UseAttributeOrder\"' parser option is true, the following\nproperties are also passed to `\"startelement\"':\n\nAttributeOrder   An array of attribute names in the order they were\nspecified, followed by the defaulted attribute\nnames.\nDefaulted        The index number of the first defaulted attribute in\n`AttributeOrder.  If this index is equal to the\nlength of `AttributeOrder', there were no defaulted\nvalues.\n\nNote to \"XML::Parser\" users:  `\"Defaulted\"' will be half the value\nof \"XML::Parser::Expat\"'s `\"specifiedattr()\"' function because\nonly attribute names are provided, not their values.\n\nendelement\nReceive notification of the end of an element.\n\nName             The element type name.\n\ncharacters\nReceive notification of character data.\n\nData             The characters from the XML document.\n\nprocessinginstruction\nReceive notification of a processing instruction.\n\nTarget           The processing instruction target.\nData             The processing instruction data, if any.\n\ncomment\nReceive notification of a comment.\n\nData             The comment data, if any.\n\nstartcdata\nReceive notification of the start of a CDATA section.\n\nNo properties defined.\n\nendcdata\nReceive notification of the end of a CDATA section.\n\nNo properties defined.\n\nentityreference\nReceive notification of an internal entity reference.  If this\nhandler is defined, internal entities will not be expanded and not\npassed to the `\"characters()\"' handler.  If this handler is not\ndefined, internal entities will be expanded if possible and passed\nto the `\"characters()\"' handler.\n\nName             The entity reference name\nValue            The entity reference value\n\nDTDHandler methods\nnotationdecl\nReceive notification of a notation declaration event.\n\nName             The notation name.\nPublicId         The notation's public identifier, if any.\nSystemId         The notation's system identifier, if any.\nBase             The base for resolving a relative URI, if any.\n\nunparsedentitydecl\nReceive notification of an unparsed entity declaration event.\n\nName             The unparsed entity's name.\nSystemId         The entity's system identifier.\nPublicId         The entity's public identifier, if any.\nBase             The base for resolving a relative URI, if any.\n\nentitydecl\nReceive notification of an entity declaration event.\n\nName             The entity name.\nValue            The entity value, if any.\nPublicId         The notation's public identifier, if any.\nSystemId         The notation's system identifier, if any.\nNotation         The notation declared for this entity, if any.\n\nFor internal entities, the `\"Value\"' parameter will contain the\nvalue and the `\"PublicId\"', `\"SystemId\"', and `\"Notation\"' will be\nundefined.  For external entities, the `\"Value\"' parameter will be\nundefined, the `\"SystemId\"' parameter will have the system id, the\n`\"PublicId\"' parameter will have the public id if it was provided\n(it will be undefined otherwise), the `\"Notation\"' parameter will\ncontain the notation name for unparsed entities.  If this is a\nparameter entity declaration, then a '%' will be prefixed to the\nentity name.\n\nNote that `\"entitydecl()\"' and `\"unparsedentitydecl()\"' overlap.\nIf both methods are implemented by a handler, then this handler\nwill not be called for unparsed entities.\n\nelementdecl\nReceive notification of an element declaration event.\n\nName             The element type name.\nModel            The content model as a string.\n\nattlistdecl\nReceive notification of an attribute list declaration event.\n\nThis handler is called for each attribute in an ATTLIST declaration\nfound in the internal subset. So an ATTLIST declaration that has\nmultiple attributes will generate multiple calls to this handler.\n\nElementName      The element type name.\nAttributeName    The attribute name.\nType             The attribute type.\nFixed            True if this is a fixed attribute.\n\nThe default for `\"Type\"' is the default value, which will either be\n\"#REQUIRED\", \"#IMPLIED\" or a quoted string (i.e. the returned\nstring will begin and end with a quote character).\n\ndoctypedecl\nReceive notification of a DOCTYPE declaration event.\n\nName             The document type name.\nSystemId         The document's system identifier.\nPublicId         The document's public identifier, if any.\nInternal         The internal subset as a string, if any.\n\nInternal will contain all whitespace, comments, processing\ninstructions, and declarations seen in the internal subset. The\ndeclarations will be there whether or not they have been processed\nby another handler (except for unparsed entities processed by the\nUnparsed handler).  However, comments and processing instructions\nwill not appear if they've been processed by their respective\nhandlers.\n\nxmldecl\nReceive notification of an XML declaration event.\n\nVersion          The version.\nEncoding         The encoding string, if any.\nStandalone       True, false, or undefined if not declared.\n\nEntityResolver\nresolveentity\nAllow the handler to resolve external entities.\n\nName             The notation name.\nSystemId         The notation's system identifier.\nPublicId         The notation's public identifier, if any.\nBase             The base for resolving a relative URI, if any.\n\n`\"resolveentity()\"' should return undef to request that the parser\nopen a regular URI connection to the system identifier or a hash\ndescribing the new input source.  This hash has the same properties\nas the `\"Source\"' parameter to `\"parse()\"':\n\nPublicId    The public identifier of the external entity being\nreferenced, or undef if none was supplied.\nSystemId    The system identifier of the external entity being\nreferenced.\nString      String containing XML text\nByteStream  An open file handle.\nCharacterStream\nAn open file handle.\nEncoding    The character encoding, if known.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Ken MacLeod, ken@bitsko.slc.ut.us\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "perl(1), PerlSAX.pod(3)\n\nExtensible Markup Language (XML) <http://www.w3c.org/XML/>\nSAX 1.0: The Simple API for XML <http://www.megginson.com/SAX/>\n\nperl v5.32.0                      2020-12-28         XML::Parser::PerlSAX(3pm)",
                "subsections": []
            }
        }
    }
}