| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.7/site-packages/pip/_vendor/html5lib/__pycache__/ |
Upload File : |
B
�N�a�� � @ s d dl mZmZmZ d dlmZmZ d dlZddlm Z ddlm
Z
ddlmZ ddlm
Z
dd lmZ dd
lmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z d d
d�Z!d!dd�Z"dd� Z#G dd� de$�Z%ej&dd� �Z'dd� Z(d"dd�Z)G dd� de*�Z+dS )#� )�absolute_import�division�unicode_literals)�with_metaclass�viewkeysN� )�_inputstream)�
_tokenizer)�treebuilders)�Marker)�_utils)�spaceCharacters�asciiUpper2Lower�specialElements�headingElements�
cdataElements�rcdataElements�
tokenTypes�
tagTokenTypes�
namespaces�htmlIntegrationPointElements�"mathmlTextIntegrationPointElements�adjustForeignAttributes�adjustMathMLAttributes�adjustSVGAttributes�E�_ReparseException�etreeTc K s$ t �|�}t||d�}|j| f|�S )a� Parse an HTML document as a string or file-like object into a tree
:arg doc: the document to parse as a string or file-like object
:arg treebuilder: the treebuilder to use when parsing
:arg namespaceHTMLElements: whether or not to namespace HTML elements
:returns: parsed tree
Example:
>>> from html5lib.html5parser import parse
>>> parse('<html><body><p>This is a doc</p></body></html>')
<Element u'{http://www.w3.org/1999/xhtml}html' at 0x7feac4909db0>
)�namespaceHTMLElements)r
�getTreeBuilder�
HTMLParser�parse)�doc�treebuilderr �kwargs�tb�p� r'