|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/lib/python2.4/site-packages/_xmlplus/dom/ext/reader/ |
Upload File : |
mò
ìm>c @ s[ d Z d k Z d k Z d k Z d k Z d k l Z d k l Z d f d „ ƒ YZ d S( s
Components for reading HTML files from a SAX-like producer.
WWW: http://4suite.com/4DOM e-mail: support@4suite.com
Copyright (c) 2000 Fourthought Inc, USA. All Rights Reserved.
See http://4suite.com/COPYRIGHT for license and copyright information
N( s Node( s implementationt HtmlDomGeneratorc B sh t Z d d „ Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d
„ Z d „ Z RS( Ni c C s
| | _ d S( N( t keepAllWst selft
_keepAllWs( R R ( ( tC /usr/lib/python2.4/site-packages/_xmlplus/dom/ext/reader/HtmlSax.pyt __init__ s c C s¢ | d j oQ t i d ƒ | _ | i i } | i i | ƒ t i
i i | ƒ | i | _
n | | _ | i i ƒ | _
g | _ | i i | i
ƒ d | _ d S( sŽ
If None is passed in as the doc, set up an empty document to act
as owner and also add all elements to this document
t N( t ownerDoct Nonet implementationt createHTMLDocumentR t _ownerDoct documentElementt det removeChildt xmlt domt extt ReleaseNodet _rootNodet createDocumentFragmentt
_nodeStackt appendt _currText( R R R
( ( R t initState s
c C s | i ƒ | i S( N( R t _completeTextNodeR ( R ( ( R t getRootNode/ s
c C sD | i o6 | i i | i ƒ } | i d i | ƒ d | _ n d S( NiÿÿÿÿR ( R R R t createTextNodet new_textR t appendChild( R R ( ( R R 3 s
c C s[ | i ƒ | i i | ƒ } x( | i ƒ D] } | i | | | ƒ q) W| i
i | ƒ d S( N( R R R t
createElementt namet new_elementt attribst keyst curr_attrib_keyt setAttributeR R ( R R R! R# R ( ( R t startElement: s
c C s9 | i ƒ | i d } | i d =| i d i | ƒ d S( Niÿÿÿÿ( R R R R R ( R R R ( ( R t
endElementB s
c C sG | i o9 | i d i t i j o | i | | | | !| _ n d S( s
If 'keepAllWs' permits, add ignorable white-space as a text node.
Remember that a Document node cannot contain text nodes directly.
If the white-space occurs outside the root element, there is no place
for it in the DOM and it must be discarded.
iÿÿÿÿN(
R R R t nodeTypet Nodet
DOCUMENT_NODER t cht startt length( R R* R+ R, ( ( R t ignorableWhitespaceH s $c C s | i | | | | !| _ d S( N( R R R* R+ R, ( R R* R+ R, ( ( R t
charactersR s c C s
| ‚ d S( N( t exception( R R/ ( ( R t errorZ s c C s
| ‚ d S( N( R/ ( R R/ ( ( R t
fatalError] s (
t __name__t
__module__R R R R R R% R&