文件操作 - lxml.cpython-311.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/defusedxml/__pycache__/lxml.cpython-311.pyc
编辑文件内容
� 8F`L � �4 � d Z ddlmZmZ ddlZddlZddlmZ ddl m Z mZmZ ej d dk ZdZej Z ej d ed �� � G d� d ej � � Z G d� dej � � Z e� � Zej Zdd�Zdd�Zdd�ZeZd� ZdS )zkDEPRECATED Example code for lxml.etree protection The code has NO protection against decompression bombs. � )�print_function�absolute_importN)�etree� )�DTDForbidden�EntitiesForbidden�NotSupportedError� z lxml.etreezOdefusedxml.lxml is no longer supported and will be removed in a future release.� )�category� stacklevelc � � � e Zd ZdZdZej Zd� Z� fd�Z d � fd� Z d� fd� Zd� fd � Zd � fd � Z � fd�Zd� fd� Z� xZS )�RestrictedElementzEA restricted Element class that filters out instances of some classes� c # �L K � | j }|D ]}t ||� � r�|V � �d S �N)� blacklist� isinstance)�self�iteratorr �childs �1/usr/lib/python3/dist-packages/defusedxml/lxml.py�_filterzRestrictedElement._filter( sF � � � ��N� �� � �E��%��+�+� ���K�K�K�K� � � c �| �� t t | � � � � � }| � |� � S r )�superr �__iter__r �r r � __class__s �r r zRestrictedElement.__iter__/ s1 �� ��*�D�1�1�:�:�<�<���|�|�H�%�%�%r NFc � �� t t | � � � ||�� � }| � |� � S )N)�tag�reversed)r r �iterchildrenr )r r! r"