shell bypass 403
o
_b= � @ s� d Z dZG dd� d�ZG dd� d�ZG dd� d�ZG dd � d �Zd
ZdZdZd
Z dZ
dZeeee e
egZdZ
dZdZdZdZdZe
eeeeegZG dd� 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 @ s( e Zd ZdZdd� Zdd� Zdd� 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 C � |�)zHandle a recoverable error.� ��self� exceptionr r �8/usr/local/python-3.10/lib/python3.10/xml/sax/handler.py�error � zErrorHandler.errorc C r )zHandle a non-recoverable error.r r r r r �
fatalError$ r zErrorHandler.fatalErrorc C s t |� dS )zHandle a warning.N)�printr r r r �warning( s zErrorHandler.warningN)�__name__�
__module__�__qualname__�__doc__r r
r r r r r r s
r c @ s� e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
d� Zdd
� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� 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 C s
d | _ d S )N�Z_locator�r r r r �__init__6 s
zContentHandler.__init__c C s
|| _ 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 Zlocatorr r r �setDocumentLocator9 s
z!ContentHandler.setDocumentLocatorc 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 r r r �
startDocumentP � zContentHandler.startDocumentc C r )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 r r r �endDocumentW r zContentHandler.endDocumentc C r )a Begin the scope of a prefix-URI Namespace mapping.
The information from this event is not necessary for normal
Namespace processing: the SAX XML reader will automatically
replace prefixes for element and attribute names when the
http://xml.org/sax/features/namespaces feature is true (the
default).
There are cases, however, when applications need to use
prefixes in character data or in attribute values, where they
cannot safely be expanded automatically; the
start/endPrefixMapping event supplies the information to the
application to expand prefixes in those contexts itself, if
necessary.
Note that start/endPrefixMapping events are not guaranteed to
be properly nested relative to each-other: all
startPrefixMapping events will occur before the corresponding
startElement event, and all endPrefixMapping events will occur
after the corresponding endElement event, but their order is
not guaranteed.Nr )r �prefixZurir r r �startPrefixMapping` r z!ContentHandler.startPrefixMappingc C r )z�End the scope of a prefix-URI mapping.
See startPrefixMapping for details. This event will always
occur after the corresponding endElement event, but the order
of endPrefixMapping events is not otherwise guaranteed.Nr )r r r r r �endPrefixMappingw r zContentHandler.endPrefixMappingc C r )a Signals the start of an element in non-namespace mode.
The name parameter contains the raw XML 1.0 name of the
element type as a string and the attrs parameter holds an
instance of the Attributes class containing the attributes of
the element.Nr )r �name�attrsr r r �startElement~ r zContentHandler.startElementc C r )z�Signals the end of an element in non-namespace mode.
The name parameter contains the name of the element type, just
as with the startElement event.Nr �r r r r r �
endElement� r zContentHandler.endElementc C r )a� Signals the start of an element in namespace mode.
The name parameter contains the name of the element type as a
(uri, localname) tuple, the qname parameter the raw XML 1.0
name used in the source document, and the attrs parameter
holds an instance of the Attributes class containing the
attributes of the element.
The uri part of the name tuple is None for elements which have
no namespace.Nr )r r �qnamer r r r �startElementNS� r zContentHandler.startElementNSc C r )z�Signals the end of an element in namespace mode.
The name parameter contains the name of the element type, just
as with the startElementNS event.Nr )r r r"