%PDF- %PDF-
Direktori : /usr/lib64/python3.6/xml/etree/__pycache__/ |
Current File : //usr/lib64/python3.6/xml/etree/__pycache__/ElementTree.cpython-36.pyc |
3 \�� � @ sH d Z ddddddddd d ddd ddddddddddgZdZddlZddlZddlZddlZddlZddlZddl m Z G dd � d e�Zdd� Z G dd� d�Zi fd d�Zd^d!d�Zd_d"d�ZeZG d#d � d �ZG d$d� d�Zejd%d&� �Zd`d'd(�Zd)d*� ZdaZyee�ZW n ek �r" Y nX d8d9� Zd:d;� Zeeed<�Zd=d� Zd>d?d@dAdBdCdDdE�Z e e_ dFdG� Z!dHdI� Z"dJdK� Z#dLdM� Z$dbdNdO�dPd�Z%G dQdR� dRej&�Z'dcdNdO�dSd�Z(dTd� Z)dddUd �Z*dedVd�Z+G dWd� d�Z,dfdXd�Z-dgdYd�Z.e-Z/dhdZd�Z0G d[d� d�Z1G d\d� d�Z2yeZ3dd]l4T W n e5k �rB Y nX dS )ia Lightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level. Element is a flexible container object designed to store hierarchical data structures in memory. It can be described as a cross between a list and a dictionary. Each Element has a number of properties associated with it: 'tag' - a string containing the element's name. 'attributes' - a Python dictionary storing the element's attributes. 'text' - a string containing the element's text content. 'tail' - an optional string containing text after the element's end tag. And a number of child elements stored in a Python sequence. To create an element instance, use the Element constructor, or the SubElement factory function. You can also use the ElementTree class to wrap an element structure and convert it to and from XML. �Comment�dump�Element�ElementTree� fromstring�fromstringlist� iselement� iterparse�parse� ParseError�PI�ProcessingInstruction�QName� SubElement�tostring�tostringlist�TreeBuilder�VERSION�XML�XMLID� XMLParser� XMLPullParser�register_namespacez1.3.0� N� )�ElementPathc @ s e Zd ZdZdS )r z�An error when parsing an XML document. In addition to its exception value, a ParseError contains two extra attributes: 'code' - the specific exception code 'position' - the line and column of the error N)�__name__� __module__�__qualname__�__doc__� r r �-/usr/lib64/python3.6/xml/etree/ElementTree.pyr h s c C s t | d�S )z2Return True if *element* appears to be an Element.�tag)�hasattr)�elementr r r r v s c @ s e Zd ZdZdZdZdZdZi fdd�Zdd� Z dd� Z d d � Zdd� Zd d� Z dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd9d!d"�Zd:d#d$�Zd;d%d&�Zd<d'd(�Zd)d*� Zd=d+d,�Zd-d.� Zd/d0� Zd1d2� Zd>d3d4�Z d?d5d6�Z!d7d8� Z"dS )@r ah An XML element. This class is the reference implementation of the Element interface. An element's length is its number of subelements. That means if you want to check if an element is truly empty, you should check BOTH its length AND its text attribute. The element tag, attribute names, and attribute values can be either bytes or strings. *tag* is the element name. *attrib* is an optional dictionary containing element attributes. *extra* are additional element attributes given as keyword arguments. Example form: <tag attrib>text<child/>...</tag>tail Nc K sD t |t�std|jjf ��|j� }|j|� || _|| _g | _ d S )Nzattrib must be dict, not %s) � isinstance�dict� TypeError� __class__r �copy�updater! �attrib� _children)�selfr! r* �extrar r r �__init__� s zElement.__init__c C s d| j j| jt| �f S )Nz<%s %r at %#x>)r'