ok
Direktori : /opt/alt/python38/lib64/python3.8/xml/dom/__pycache__/ |
Current File : //opt/alt/python38/lib64/python3.8/xml/dom/__pycache__/expatbuilder.cpython-38.pyc |
U .��c�� � @ s d Z ddlmZmZmZ ddlmZmZmZ ddlm Z ddl mZmZ ddl mZ ejZejZejZejjZejjZejjZejjZe�� Ze�dd�e�dd �e�dd �e�dd�e�dd�e�dd �e�dd�e�dd�e�dd�d� ZG dd� de�Zdd� Zdd� ZG dd� d�ZeeefZ G dd� de�Z!G dd� de�Z"G dd� de"�Z#G d d!� d!e"�Z$d"Z%d#e% Z&G d$d%� d%e�Z'G d&d'� d'�Z(G d(d)� d)e(e�Z)G d*d+� d+e(e'�Z*G d,d-� d-e+�Z,G d.d/� d/e�Z-d;d1d2�Z.d<d3d4�Z/d=d5d6�Z0d>d7d8�Z1d9d:� Z2dS )?z�Facility to use the Expat parser to load a minidom instance from a string or file. This avoids all the overhead of SAX and pulldom to gain performance. � )� xmlbuilder�minidom�Node)�EMPTY_NAMESPACE�EMPTY_PREFIX�XMLNS_NAMESPACE)�expat)� _append_child�_set_attribute_node)� NodeFilterNZcdata�enumeration�entity�entities�idZidrefZidrefsZnmtokenZnmtokens) ZCDATA�ENUMZENTITYZENTITIES�IDZIDREFZIDREFSZNMTOKENZNMTOKENSc @ sZ e Zd ZdZddd�Zdd� Zdd� Zd d � Zdd� Zd d� Z dd� Z dd� Zdd� ZdS )�ElementInfo�� _attr_info�_model�tagNameNc C s || _ g | _|| _d S �N)r r r )�selfr �model� r �9/opt/alt/python38/lib64/python3.8/xml/dom/expatbuilder.py�__init__? s zElementInfo.__init__c C s | j | j| jfS r r �r r r r �__getstate__D s zElementInfo.__getstate__c C s |\| _ | _| _d S r r )r �stater r r �__setstate__G s zElementInfo.__setstate__c C sN | j D ]@}|d |kr|d }|d dkr6td S t|d S qtjS )N� ���r �(r )r � _typeinfo_mapr �_no_type)r �aname�info�tr r r �getAttributeTypeJ s zElementInfo.getAttributeTypec C s t jS r )r r% )r �namespaceURI� localNamer r r �getAttributeTypeNST s zElementInfo.getAttributeTypeNSc C s, | j r$| j d }|tjjtjjfkS dS d S �Nr F)r r r Z XML_CTYPE_ANYZXML_CTYPE_MIXED)r �typer r r �isElementContentW s �zElementInfo.isElementContentc C s | j r| j d tjjkS dS d S r- )r r r ZXML_CTYPE_EMPTYr r r r �isEmpty_ s zElementInfo.isEmptyc C s, | j D ] }|d |kr|d dk S qdS )Nr! r"