관리-도구
편집 파일: _html5builder.cpython-37.pyc
B �eP� � @ sZ d Z ddlmZmZ ddlmZmZ G dd� de�ZG dd� de�Z G dd � d ej �Z d S )z� Legacy module - don't use in new code! html5lib now has its own proper implementation. This module implements a tree builder for html5lib that generates lxml html element trees. This module uses camelCase as it follows the html5lib style guide. � )�_base�etree)�htmlr c @ s e Zd Zdd� ZdS )�DocumentTypec C s || _ || _|| _d S )N)�name�publicId�systemId)�selfr r r � r �J/opt/alt/python37/lib64/python3.7/site-packages/lxml/html/_html5builder.py�__init__ s zDocumentType.__init__N)�__name__� __module__�__qualname__r r r r r r s r c @ s e Zd Zdd� Zdd� ZdS )�Documentc C s d | _ g | _d S )N)�_elementTree� childNodes)r r r r r s zDocument.__init__c C s | j �� �|j� d S )N)r ZgetrootZaddnext�_element)r �elementr r r �appendChild s zDocument.appendChildN)r r r r r r r r r r s r c @ sZ e Zd ZeZeZdZdZeZ dd� Z dd� Zdd� Zdd � Z d d� Zddd �Zdd� ZdS )�TreeBuilderNc O sD t jtdd�}t jtdd�}|j| _|j| _tj j | f|�|� d S )NF)ZfullTree)�etree_buildersZgetETreeModuler r ZElement�elementClass�Comment�commentClassr r r )r �args�kwargsZhtml_builderZ etree_builderr r r r '