ok

Mini Shell

Direktori : /lib64/python2.7/site-packages/lxml/html/
Upload File :
Current File : //lib64/python2.7/site-packages/lxml/html/_html5builder.pyc

�
�ePc@s{dZddlmZmZddlmZmZdefd��YZdefd��YZ	dej
fd	��YZ
d
S(s�
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.
i����(t_basetetree(thtmlRtDocumentTypecBseZd�ZRS(cCs||_||_||_dS(N(tnametpublicIdtsystemId(tselfRRR((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyt__init__s		(t__name__t
__module__R(((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyRstDocumentcBseZd�Zd�ZRS(cCsd|_g|_dS(N(tNonet_elementTreet
childNodes(R((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyRs	cCs|jj�j|j�dS(N(R
tgetroottaddnextt_element(Rtelement((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pytappendChilds(R	R
RR(((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyRs	tTreeBuildercBsheZeZeZdZdZeZ	d�Z
d�Zd�Zd�Z
d�Zdd�Zd�ZRS(cOs\tjtdt�}tjtdt�}|j|_|j|_t	j
j|||�dS(NtfullTree(tetree_builderstgetETreeModuleRtFalseRtElementtelementClasstCommenttcommentClassRRR(Rtargstkwargsthtml_buildert
etree_builder((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyR's
cCs/tjj|�t|_g|_d|_dS(N(RRtresetRtrootInsertedtinitialCommentsRtdoctype(R((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyR!.s		cCs
|jjS(N(tdocumentR
(R((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pytgetDocument4scCseg}|jdj}|jr2|j|j�n|j|j��|jra|j|j�n|S(Ni(topenElementsRttexttappendtextendtgetchildrenttail(RtfragmentR((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pytgetFragment7s		cCs"|j|||�}||_dS(N(tdoctypeClassR$(RRRRR$((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyt
insertDoctypeAscCs6|js|jj|�ntjj|||�dS(N(R"R#R)RRt
insertComment(Rtdatatparent((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyR1Es	cCsDg}|jr�|jjr�|jd|jj�|jjdk	sV|jjdk	r||jd|jj|jjf�n|jd�n|jd�tjdj|��}x'|j	D]}|j
tj|��q�W|j
�|_|j�|j_|j|�}||_|jjj|�|jj|�t|_dS(Ns<!DOCTYPE %ss PUBLIC "%s" "%s"t>s
<html></html>t(R$RR)RRRRt
fromstringtjoinR#taddpreviousRRt
documentClassR%tgetroottreeR
RRRR'tTrueR"(RRtbuftroottcommenttroot_element((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyt
insertRootKs$$
	N(R	R
RR9RR/RRRt
fragmentClassRR!R&R.R0R1R@(((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyR s				
	N(t__doc__thtml5lib.treebuildersRRRtlxmlRtobjectRRR(((s=/usr/lib64/python2.7/site-packages/lxml/html/_html5builder.pyt<module>	s


Zerion Mini Shell 1.0