AlkantarClanX12
Current Path : /opt/alt/python311/lib64/python3.11/xml/sax/__pycache__/ |
Current File : //opt/alt/python311/lib64/python3.11/xml/sax/__pycache__/handler.cpython-311.pyc |
� c��f= � �� � d Z dZ G d� d� � Z G d� d� � Z G d� d� � Z G d� d � � Zd ZdZdZd Z dZ dZeeee e egZdZ dZdZdZdZdZe eeeeegZ G d� d� � ZdS )a0 This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id$ z2.0betac �$ � e Zd ZdZd� Zd� Zd� ZdS )�ErrorHandlera� Basic interface for SAX error handlers. If you create an object that implements this interface, then register the object with your XMLReader, the parser will call the methods in your object to report all warnings and errors. There are three levels of errors available: warnings, (possibly) recoverable errors, and unrecoverable errors. All methods take a SAXParseException as the only parameter.c � � |�)zHandle a recoverable error.� ��self� exceptions �6/opt/alt/python311/lib64/python3.11/xml/sax/handler.py�errorzErrorHandler.error � � ��� c � � |�)zHandle a non-recoverable error.r r s r � fatalErrorzErrorHandler.fatalError$ r r c �$ � t |� � dS )zHandle a warning.N)�printr s r �warningzErrorHandler.warning( s � � �i�����r N)�__name__� __module__�__qualname__�__doc__r r r r r r r r sK � � � � � �0� 0�� � �� � �� � � � r r c �f � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � Zd� Zd� ZdS )�ContentHandlerz�Interface for receiving logical document content events. This is the main callback interface in SAX, and the one most important to applications. The order of events in this interface mirrors the order of the information in the document.c � � d | _ d S )N��_locator�r s r �__init__zContentHandler.__init__6 s � ��� � � r c � � || _ dS )a# Called by the parser to give the application a locator for locating the origin of document events. SAX parsers are strongly encouraged (though not absolutely required) to supply a locator: if it does so, it must supply the locator to the application by invoking this method before invoking any of the other methods in the DocumentHandler interface. The locator allows the application to determine the end position of any document-related event, even if the parser is not reporting an error. Typically, the application will use this information for reporting its own errors (such as character content that does not match an application's business rules). The information returned by the locator is probably not sufficient for use with a search engine. Note that the locator will return correct information only during the invocation of the events in this interface. The application should not attempt to use it at any other time.Nr )r �locators r �setDocumentLocatorz!ContentHandler.setDocumentLocator9 s � �* �� � � r c � � dS )z�Receive notification of the beginning of a document. The SAX parser will invoke this method only once, before any other methods in this interface or in DTDHandler (except for setDocumentLocator).Nr r s r � startDocumentzContentHandler.startDocumentP � � � � r c � � dS )aQ Receive notification of the end of a document. The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.Nr r s r �endDocumentzContentHandler.endDocumentW r"