/opt/alt/python-internal/lib64/python3.11/xml/sax/__pycache__
NameSizeModeActions
expatreader.cpython-311.opt-1.pyc228670644editdlrm
expatreader.cpython-311.opt-2.pyc224600644editdlrm
expatreader.cpython-311.pyc228670644editdlrm
handler.cpython-311.opt-1.pyc155690644editdlrm
handler.cpython-311.opt-2.pyc65980644editdlrm
handler.cpython-311.pyc155690644editdlrm
saxutils.cpython-311.opt-1.pyc215970644editdlrm
saxutils.cpython-311.opt-2.pyc199790644editdlrm
saxutils.cpython-311.pyc215970644editdlrm
xmlreader.cpython-311.opt-1.pyc209590644editdlrm
xmlreader.cpython-311.opt-2.pyc148090644editdlrm
xmlreader.cpython-311.pyc209590644editdlrm
_exceptions.cpython-311.opt-1.pyc68490644editdlrm
_exceptions.cpython-311.opt-2.pyc42830644editdlrm
_exceptions.cpython-311.pyc68490644editdlrm
__init__.cpython-311.opt-1.pyc50850644editdlrm
__init__.cpython-311.opt-2.pyc40290644editdlrm
__init__.cpython-311.pyc50850644editdlrm
Edit: /opt/alt/python-internal/lib64/python3.11/xml/sax/__pycache__/xmlreader.cpython-311.pyc (20959B)
§ Q(äBÁE¯Šãóð—dZddlmZddlmZmZGd„d¦«ZGd„de¦«ZGd„d ¦«ZGd „d ¦«Z Gd „d ¦«Z Gd„de ¦«Z d„Z e dkr e ¦«dSdS)z]An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. é)Úhandler)ÚSAXNotSupportedExceptionÚSAXNotRecognizedExceptioncól—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„ZdS)Ú XMLReadera%Interface for reading an XML document using callbacks. XMLReader is the interface that an XML parser's SAX2 driver must implement. This interface allows an application to set and query features and properties in the parser, to register event handlers for document processing, and to initiate a document parse. All SAX interfaces are assumed to be synchronous: the parse methods must not return until parsing is complete, and readers must wait for an event-handler callback to return before reporting the next event.cóÆ—tj¦«|_tj¦«|_tj¦«|_tj¦«|_dS©N) rÚContentHandlerÚ _cont_handlerÚ DTDHandlerÚ _dtd_handlerÚEntityResolverÚ _ent_handlerÚ ErrorHandlerÚ _err_handler©Úselfs ú>/opt/alt/python-internal/lib64/python3.11/xml/sax/xmlreader.pyÚ__init__zXMLReader.__init__sL€Ý$Ô3Ñ5Ô5ˆÔÝ#Ô.Ñ0Ô0ˆÔÝ#Ô2Ñ4Ô4ˆÔÝ#Ô0Ñ2Ô2ˆÔÐÐócó —td¦«‚)zAParse an XML document from a system identifier or an InputSource.ú This method must be implemented!©ÚNotImplementedError©rÚsources rÚparsezXMLReader.parses€å!Ð"DÑEÔEÐErcó—|jS)z#Returns the current ContentHandler.©r rs rÚgetContentHandlerzXMLReader.getContentHandler"s €àÔ!Ð!rcó—||_dS)z:Registers a new object to receive document content events.Nr©rrs rÚsetContentHandlerzXMLReader.setContentHandler&s€à$ˆÔÐÐrcó—|jS)z Returns the current DTD handler.©r rs rÚ getDTDHandlerzXMLReader.getDTDHandler*ó €àÔ Ð rcó—||_dS)z7Register an object to receive basic DTD-related events.Nr%r"s rÚ setDTDHandlerzXMLReader.setDTDHandler.ó€à#ˆÔÐÐrcó—|jS)z#Returns the current EntityResolver.©rrs rÚgetEntityResolverzXMLReader.getEntityResolver2r'rcó—||_dS)z0Register an object to resolve external entities.Nr,)rÚresolvers rÚsetEntityResolverzXMLReader.setEntityResolver6s€à$ˆÔÐÐrcó—|jS)z!Returns the current ErrorHandler.©rrs rÚgetErrorHandlerzXMLReader.getErrorHandler:r'rcó—||_dS)z3Register an object to receive error-message events.Nr2r"s rÚsetErrorHandlerzXMLReader.setErrorHandler>r*rcó —td¦«‚)aHAllow an application to set the locale for errors and warnings. SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, however, they must raise a SAX exception. Applications may request a locale change in the middle of a parse.zLocale support not implemented)r)rÚlocales rÚ setLocalezXMLReader.setLocaleBs€õ'Ð'GÑHÔHÐHrcó&—td|z¦«‚)z1Looks up and returns the state of a SAX2 feature.úFeature '%s' not recognized©r©rÚnames rÚ getFeaturezXMLReader.getFeatureKó€å'Ð(EÈÑ(LÑMÔMÐMrcó&—td|z¦«‚)z!Sets the state of a SAX2 feature.r:r;)rr=Ústates rÚ setFeaturezXMLReader.setFeatureOr?rcó&—td|z¦«‚)z2Looks up and returns the value of a SAX2 property.úProperty '%s' not recognizedr;r<s rÚ getPropertyzXMLReader.getPropertySó€å'Ð(FÈÑ(MÑNÔNÐNrcó&—td|z¦«‚)z"Sets the value of a SAX2 property.rDr;)rr=Úvalues rÚ setPropertyzXMLReader.setPropertyWrFrN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr r#r&r)r-r0r3r5r8r>rBrErI©rrrr s€€€€€ð ð ð3ð3ð3ð FðFðFð"ð"ð"ð%ð%ð%ð!ð!ð!ð$ð$ð$ð!ð!ð!ð%ð%ð%ð!ð!ð!ð$ð$ð$ðIðIðIðNðNðNðNðNðNðOðOðOðOðOðOðOðOrrcó8—eZdZdZd d„Zd„Zd„Zd„Zd„Zd„Z d S) ÚIncrementalParserasThis interface adds three extra methods to the XMLReader interface that allow XML parsers to support incremental parsing. Support for this interface is optional, since not all underlying XML parsers support this functionality. When the parser is instantiated it is ready to begin accepting data from the feed method immediately. After parsing has been finished with a call to close the reset method must be called to make the parser ready to accept new data, either from feed or using the parse method. Note that these methods must _not_ be called during parsing, that is, after parse has been called and before it returns. By default, the class also implements the parse method of the XMLReader interface using the feed, close and reset methods of the IncrementalParser interface as a convenience to SAX 2.0 driver writers.écóH—||_t |¦«dSr )Ú_bufsizerr)rÚbufsizes rrzIncrementalParser.__init__os#€ØˆŒ Ý×Ò˜4Ñ Ô Ð Ð Ð rcó|—ddlm}| |¦«}| |¦«| ¦«}|€| ¦«}| |j¦«}|r1| |¦«| |j¦«}|°1|  ¦«dS)Nr)Úsaxutils) ÚrVÚprepare_input_sourceÚ prepareParserÚgetCharacterStreamÚ getByteStreamÚreadrSÚfeedÚclose)rrrVÚfileÚbuffers rrzIncrementalParser.parsess¿€ØÐÐÐÐÐØ×.Ò.¨vÑ6Ô6ˆà ×Ò˜6Ñ"Ô"Ð"Ø×(Ò(Ñ*Ô*ˆØ ˆ<Ø×'Ò'Ñ)Ô)ˆDØ—’˜4œ=Ñ)Ô)ˆØð .Ø �IŠI�fÑ Ô Ð Ø—Y’Y˜tœ}Ñ-Ô-ˆFðð .ð � Š ‰ Œ ˆ ˆ ˆ rcó —td¦«‚)aThis method gives the raw XML data in the data parameter to the parser and makes it parse the data, emitting the corresponding events. It is allowed for XML constructs to be split across several calls to feed. feed may raise SAXException.rr)rÚdatas rr]zIncrementalParser.feed�s€õ"Ð"DÑEÔEÐErcó —td¦«‚)ztThis method is called by the parse implementation to allow the SAX 2.0 driver to prepare itself for parsing.z!prepareParser must be overridden!rrs rrYzIncrementalParser.prepareParserŠs€õ"Ð"EÑFÔFÐFrcó —td¦«‚)a´This method is called when the entire XML document has been passed to the parser through the feed method, to notify the parser that there are no more data. This allows the parser to do the final checks on the document and empty the internal data buffer. The parser will not be ready to parse another document until the reset method has been called. close may raise SAXException.rrrs rr^zIncrementalParser.close�s€õ"Ð"DÑEÔEÐErcó —td¦«‚)zßThis method is called after close has been called to reset the parser so that it is ready to parse new documents. The results of calling parse or feed after close without calling reset are undefined.rrrs rÚresetzIncrementalParser.resetœs€õ "Ð"DÑEÔEÐErN)rQ) rJrKrLrMrrr]rYr^rfrNrrrPrP[s‹€€€€€ððð&!ð!ð!ð!ð ð ð ðFðFðFðGðGðGð Fð Fð FðFðFðFðFðFrrPcó*—eZdZdZd„Zd„Zd„Zd„ZdS)ÚLocatorzÖInterface for associating a SAX event with a document location. A locator object will return valid results only during calls to DocumentHandler methods; at any other time, the results are unpredictable.có—dS)z6Return the column number where the current event ends.éÿÿÿÿrNrs rÚgetColumnNumberzLocator.getColumnNumber«ó€àˆrrcó—dS)z4Return the line number where the current event ends.rjrNrs rÚ getLineNumberzLocator.getLineNumber¯rlrcó—dS)z3Return the public identifier for the current event.NrNrs rÚ getPublicIdzLocator.getPublicId³ó€àˆtrcó—dS)z3Return the system identifier for the current event.NrNrs rÚ getSystemIdzLocator.getSystemId·rqrN)rJrKrLrMrkrnrprsrNrrrhrh¥sZ€€€€€ð"ð"ð ðððððððððððððrrhcóV—eZdZdZdd„Zd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z d „ZdS)Ú InputSourceanEncapsulation of the information needed by the XMLReader to read entities. This class may include information about the public identifier, system identifier, byte stream (possibly with character encoding information) and/or the character stream of an entity. Applications will create objects of this class for use in the XMLReader.parse method and for returning from EntityResolver.resolveEntity. An InputSource belongs to the application, the XMLReader is not allowed to modify InputSource objects passed to it from the application, although it may make copies and modify those.NcóL—||_d|_d|_d|_d|_dSr )Ú_InputSource__system_idÚ_InputSource__public_idÚ_InputSource__encodingÚ_InputSource__bytefileÚ_InputSource__charfile©rÚ system_ids rrzInputSource.__init__Ís+€Ø$ˆÔØˆÔØˆŒØˆŒØˆŒˆˆrcó—||_dS)z/Sets the public identifier of this InputSource.N©rx)rÚ public_ids rÚ setPublicIdzInputSource.setPublicIdÔó€à$ˆÔÐÐrcó—|jS)z2Returns the public identifier of this InputSource.rrs rrpzInputSource.getPublicIdØó €àÔÐrcó—||_dS)z/Sets the system identifier of this InputSource.N©rwr|s rÚ setSystemIdzInputSource.setSystemIdÜr‚rcó—|jS)z2Returns the system identifier of this InputSource.r†rs rrszInputSource.getSystemIdàr„rcó—||_dS)a4Sets the character encoding of this InputSource. The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML recommendation). The encoding attribute of the InputSource is ignored if the InputSource also contains a character stream.N©ry)rÚencodings rÚ setEncodingzInputSource.setEncodingäó€ð#ˆŒˆˆrcó—|jS)z/Get the character encoding of this InputSource.rŠrs rÚ getEncodingzInputSource.getEncodingîó €àŒÐrcó—||_dS)aÅSet the byte stream (a Python file-like object which does not perform byte-to-character conversion) for this input source. The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself. If the application knows the character encoding of the byte stream, it should set it with the setEncoding method.N©rz)rÚbytefiles rÚ setByteStreamzInputSource.setByteStreamòs€ð#ˆŒˆˆrcó—|jS)zŸGet the byte stream for this input source. The getEncoding method will return the character encoding for this byte stream, or None if unknown.r’rs rr[zInputSource.getByteStreamÿs €ð ŒÐrcó—||_dS)a^Set the character stream for this input source. (The stream must be a Python 2.0 Unicode-wrapped file-like that performs conversion to Unicode strings.) If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.N©r{)rÚcharfiles rÚsetCharacterStreamzInputSource.setCharacterStreamr�rcó—|jS)z/Get the character stream for this input source.r—rs rrZzInputSource.getCharacterStreamr�rr )rJrKrLrMrr�rpr‡rsrŒr�r”r[r™rZrNrrruru½sÊ€€€€€ð Bð Bð ð ð ð ð%ð%ð%ð ð ð ð%ð%ð%ð ð ð ð#ð#ð#ðððð #ð #ð #ðððð#ð#ð#ðððððrrucóv—eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zdd„Zd„Zd„Zd„ZdS)ÚAttributesImplcó—||_dS)zQNon-NS-aware implementation. attrs should be of the form {name : value}.N©Ú_attrs)rÚattrss rrzAttributesImpl.__init__s€ðˆŒ ˆ ˆ rcó*—t|j¦«Sr ©ÚlenrŸrs rÚ getLengthzAttributesImpl.getLengthó€Ý�4”;ÑÔÐrcó—dS)NÚCDATArNr<s rÚgetTypezAttributesImpl.getType!s€Øˆwrcó—|j|Sr ržr<s rÚgetValuezAttributesImpl.getValue$ó€ØŒ{˜4Ô Ð rcó—|j|Sr ržr<s rÚgetValueByQNamezAttributesImpl.getValueByQName'r«rcó6—||jvrt|¦«‚|Sr ©rŸÚKeyErrorr<s rÚgetNameByQNamezAttributesImpl.getNameByQName*ó €Ø �t”{Ð "Ð "ݘ4‘.”.Р؈ rcó6—||jvrt|¦«‚|Sr r¯r<s rÚgetQNameByNamezAttributesImpl.getQNameByName/r²rcóN—t|j ¦«¦«Sr ©ÚlistrŸÚkeysrs rÚgetNameszAttributesImpl.getNames4ó€Ý�D”K×$Ò$Ñ&Ô&Ñ'Ô'Ð'rcóN—t|j ¦«¦«Sr r¶rs rÚ getQNameszAttributesImpl.getQNames7rºrcó*—t|j¦«Sr r¢rs rÚ__len__zAttributesImpl.__len__:r¥rcó—|j|Sr ržr<s rÚ __getitem__zAttributesImpl.__getitem__=r«rcóN—t|j ¦«¦«Sr r¶rs rr¸zAttributesImpl.keys@rºrcó—||jvSr ržr<s rÚ __contains__zAttributesImpl.__contains__Cs€Ø�t”{Ð"Ð"rNcó8—|j ||¦«Sr )rŸÚget)rr=Ú alternatives rrÅzAttributesImpl.getFs€ØŒ{�Š˜t [Ñ1Ô1Ð1rcó6—| |j¦«Sr )Ú __class__rŸrs rÚcopyzAttributesImpl.copyIs€Ø�~Š~˜dœkÑ*Ô*Ð*rcóN—t|j ¦«¦«Sr )r·rŸÚitemsrs rrËzAttributesImpl.itemsLs€Ý�D”K×%Ò%Ñ'Ô'Ñ(Ô(Ð(rcóN—t|j ¦«¦«Sr )r·rŸÚvaluesrs rrÍzAttributesImpl.valuesOs€Ý�D”K×&Ò&Ñ(Ô(Ñ)Ô)Ð)rr )rJrKrLrr¤r¨rªr­r±r´r¹r¼r¾rÀr¸rÃrÅrÉrËrÍrNrrrœrœs€€€€€ðððð  ð ð ðððð!ð!ð!ð!ð!ð!ðððð ððð (ð(ð(ð(ð(ð(ð ð ð ð!ð!ð!ð(ð(ð(ð#ð#ð#ð2ð2ð2ð2ð+ð+ð+ð)ð)ð)ð*ð*ð*ð*ð*rrœcó2—eZdZd„Zd„Zd„Zd„Zd„Zd„ZdS)ÚAttributesNSImplcó"—||_||_dS)z–NS-aware implementation. attrs should be of the form {(ns_uri, lname): value, ...}. qnames of the form {(ns_uri, lname): qname, ...}.N)rŸÚ_qnames)rr Úqnamess rrzAttributesNSImpl.__init__Vs€ð ˆŒ ؈Œ ˆ ˆ rcóˆ—|j ¦«D]\}}||kr|j|cSŒt|¦«‚r )rÑrËrŸr°©rr=ÚnsnameÚqnames rr­z AttributesNSImpl.getValueByQName^sR€Ø#œ|×1Ò1Ñ3Ô3ð +ð +‰OˆV�UؘŠ}ˆ}Ø”{ 6Ô*Ð*Ð*Ð*ðõ�t‰nŒnÐrcór—|j ¦«D]\}}||kr|cSŒt|¦«‚r )rÑrËr°rÔs rr±zAttributesNSImpl.getNameByQNameesH€Ø#œ|×1Ò1Ñ3Ô3ð ð ‰OˆV�UؘŠ}ˆ}Ø� � � ðõ�t‰nŒnÐrcó—|j|Sr )rÑr<s rr´zAttributesNSImpl.getQNameByNamels€ØŒ|˜DÔ!Ð!rcóN—t|j ¦«¦«Sr )r·rÑrÍrs rr¼zAttributesNSImpl.getQNamesos€Ý�D”L×'Ò'Ñ)Ô)Ñ*Ô*Ð*rcóB—| |j|j¦«Sr )rÈrŸrÑrs rrÉzAttributesNSImpl.copyrs€Ø�~Š~˜dœk¨4¬<Ñ8Ô8Ð8rN) rJrKrLrr­r±r´r¼rÉrNrrrÏrÏTsn€€€€€ðððððððððð"ð"ð"ð+ð+ð+ð9ð9ð9ð9ð9rrÏcóZ—t¦«t¦«t¦«dSr )rrPrhrNrrÚ_testrÜvs$€Ý �K„K€KÝÑÔÐÝ �I„I€I€I€IrÚ__main__N)rMrWrÚ _exceptionsrrrrPrhrurœrÏrÜrJrNrrúrßs�ðð"ð"ðÐÐÐÐÐàLÐLÐLÐLÐLÐLÐLÐLð NOðNOðNOðNOðNOñNOôNOðNOð`FFðFFðFFðFFðFF˜ ñFFôFFðFFðTððððñôðð0UðUðUðUðUñUôUðUðr:*ð:*ð:*ð:*ð:*ñ:*ô:*ð:*ð|9ð9ð9ð9ð9�~ñ9ô9ð9ðDððð  ˆzÒÐØ €E�G„G€G€G€GðÐr