✏️ 编辑:xmlreader.cpython-39.opt-1.pyc
路径:
/usr/lib64/python3.9/xml/sax/__pycache__/xmlreader.cpython-39.opt-1.pyc
大小:16.5 KB · 修改:2026-08-12 15:51:23 · 权限:0644 · 只读(保存会失败)
← 返回目录
👁 查看
⬇ 下载
检测到二进制内容,直接保存可能损坏文件。请改用「上传替换」。
a �i�1 � @ s� d Z ddlmZ ddlmZmZ G dd� d�ZG dd� de�ZG dd � d �ZG d d� d�Z G dd � d �Z G dd� de �Zdd� Ze dkr�e� dS )z]An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. � )�handler)�SAXNotSupportedException�SAXNotRecognizedExceptionc @ s� e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zd S )!� 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 C s, t �� | _t �� | _t �� | _t �� | _d S �N) r ZContentHandler� _cont_handlerZ DTDHandler�_dtd_handlerZEntityResolver�_ent_handlerZErrorHandler�_err_handler��self� r �)/usr/lib64/python3.9/xml/sax/xmlreader.py�__init__ s zXMLReader.__init__c C s t d��dS )zAParse an XML document from a system identifier or an InputSource.� This method must be implemented!N��NotImplementedError�r �sourcer r r �parse s zXMLReader.parsec C s | j S )z#Returns the current ContentHandler.�r r r r r �getContentHandler"