KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21572/root/usr/lib64/python2.4/site-packages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib64/python2.4/site-packages/drv_libxml2.pyc
mò
¢=nTc@s'dZdZdZdkZdklZlZeefZdkTdk	l
Z
lZdkl
Z
lZlZlZlZlZlZlZlZlZeidƒd	Zd
„Zy
dkZWn%ej
oZedeƒ‚nXde
ifd
„ƒYZde
ifd„ƒYZ d„Z!dS(sí A SAX2 driver for libxml2, on top of it's XmlReader API

USAGE
    # put this file (drv_libxml2.py) in PYTHONPATH
    import xml.sax
    reader = xml.sax.make_parser(["drv_libxml2"])
    # ...and the rest is standard python sax.

CAVEATS
    - Lexical handlers are supported, except for start/endEntity
      (waiting for XmlReader.ResolveEntity) and start/endDTD
    - Error callbacks are not exactly synchronous, they tend
      to be invoked before the corresponding content callback,
      because the underlying reader interface parses
      data by chunks of 512 bytes
    
TODO
    - search for TODO
    - some ErrorHandler events (warning)
    - some ContentHandler events (setDocumentLocator, skippedEntity)
    - EntityResolver (using libxml2.?)
    - DTDHandler (if/when libxml2 exposes such node types)
    - DeclHandler (if/when libxml2 exposes such node types)
    - property_xml_string?
    - feature_string_interning?
    - Incremental parser
    - additional performance tuning:
      - one might cache callbacks to avoid some name lookups
      - one might implement a smarter way to pass attributes to startElement
        (some kind of lazy evaluation?)
      - there might be room for improvement in start/endPrefixMapping
      - other?

u Stéphane Bidoul <sbi@skynet.be>s0.3N(s
StringTypesUnicodeType(t*(s	xmlreaderssaxutils(
sfeature_namespacessfeature_namespace_prefixessfeature_string_interningsfeature_validationsfeature_external_gessfeature_external_pessproperty_lexical_handlersproperty_declaration_handlersproperty_dom_nodesproperty_xml_stringtutf8icCs'|djo|Snt|ƒdSdS(Ni(tstNonet_decoder(R((t1/usr/lib64/python2.4/site-packages/drv_libxml2.pyt_d<s
s+libxml2 not available: import error was: %stLocatorcBs;tZdZd„Zd„Zd„Zd„Zd„ZRS(s4SAX Locator adapter for libxml2.xmlTextReaderLocatorcCs
||_dS(N(tlocatortselft_Locator__locator(R	R((Rt__init__KscCsdS(s6Return the column number where the current event ends.iÿÿÿÿN((R	((RtgetColumnNumberNscCs
|iiƒS(s4Return the line number where the current event ends.N(R	R
t
LineNumber(R	((Rt
getLineNumberRscCsdS(s3Return the public identifier for the current event.N(R(R	((RtgetPublicIdVscCs
|iiƒS(s3Return the system identifier for the current event.N(R	R
tBaseURI(R	((RtgetSystemIdZs(t__name__t
__module__t__doc__RRRRR(((RRHs				t
LibXml2ReadercBsbtZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d	„Z
d
„ZRS(NcCs\tii|ƒd|_d|_d|_d|_d|_d|_
d|_d|_dS(Nii(
t	xmlreadert	XMLReaderRR	t_LibXml2Reader__nst_LibXml2Reader__nspfxt_LibXml2Reader__validatet_LibXml2Reader__extparamst_LibXml2Reader__parsingRt_LibXml2Reader__lex_handlert_LibXml2Reader__decl_handlert_LibXml2Reader__errors(R	((RR`s							cCsI|idjo
g|_n|ii|t|dt|ƒƒfƒdS(N(	R	RRtappendtseveritytSAXParseExceptiontmsgRR(R	targR#R!R((Rt
_errorHandleros
cCs—x‡|iD]|\}}|titifjo|ii|ƒq
|o,||iddjo|ii
|ƒq
|ii|ƒq
Wd|_dS(Niÿÿÿÿi(
R	RR!t	exceptiontlibxml2t PARSER_SEVERITY_VALIDITY_WARNINGtPARSER_SEVERITY_WARNINGt_err_handlertwarningtfatalt
fatalErrorterrorR(R	R,R&R!((Rt
_reportErrorsvs
cCsqd|_zWt|ƒtjoti|ƒ}	n:ti	|ƒ}ti
|iƒƒ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teStreamtinputt
newTextReaderRtSetErrorHandlerR%RRt
SetParserProptPARSER_LOADDTDtPARSER_DEFAULTATTRStPARSER_SUBST_ENTITIEStPARSER_VALIDATERRRtAttributesNSImpltattributesNSImpltAttributesImpltattributesImpltprefixest
_cont_handlert
startDocumenttReadtrRR/R*R-tSAXExceptiontNodeTypetnodeTypeRtNamespaceUrit	LocalNameteltNametNameteltQNamet_attrstattrst_qnamestqnamestnewPrefixestMoveToNextAttributetqnametValuetvaluet
startswithtlent	newPrefixR tstartPrefixMappingRtattNamet
MoveToElementtstartElementNStIsEmptyElementtendElementNStendPrefixMappingtstartElementt
endElementtpoptprefixt
characterstignorableWhitespaceRt
startCDATAtendCDATAtstartEntityt
ResolveEntityt	endEntitytprocessingInstructiontcommenttendDocumenttClose(R	R2RCRiRTRERRRWRFR5R:RMRVR`RYR[RJRPR^((Rtparse…sð	






$




$








*
 
 
 
 


!
/
$




cCstdƒ‚dS(NsDTDHandler not supported(tSAXNotSupportedException(R	thandler((Rt
setDTDHandler0scCstdƒ‚dS(NsEntityResolver not supported(Rv(R	tresolver((RtsetEntityResolver4scCs‰|tjo|iSnn|tjo|iSnV|tjo|iSn>|tjodSn)|t	jo|i
Sntd|ƒ‚dS(NisFeature '%s' not recognized(tnametfeature_namespacesR	Rtfeature_namespace_prefixesRtfeature_validationRtfeature_external_gestfeature_external_pesRtSAXNotRecognizedException(R	R{((Rt
getFeature8s




cCsÌ|iotd|ƒ‚n|tjo
||_n‘|tjo
||_nw|t	jo
||_
n]|tjo%|djotd|ƒ‚qÈn+|tjo
||_
ntd|ƒ‚dS(Ns#Cannot set feature %s while parsingisFeature '%s' not supportedsFeature '%s' not recognized(R	RRvR{R|tstateRR}RR~RRR€RR(R	R{Rƒ((Rt
setFeatureGs










cCsD|tjo|iSn)|tjo|iSntd|ƒ‚dS(NsProperty '%s' not recognized(R{tproperty_lexical_handlerR	Rtproperty_declaration_handlerRR(R	R{((RtgetProperty\s


cCsX|tjo
||_n;|tjotd|ƒ‚||_ntd|ƒ‚dS(NsProperty '%s' not supportedsProperty '%s' not recognized(	R{R…R[R	RR†RvRR(R	R{R[((RtsetPropertyes



(RRRR%R/RuRxRzR‚R„R‡Rˆ(((RR^s				«						cCstƒS(N(R(((Rt
create_parserqs("Rt
__author__t__version__tcodecsttypest
StringTypetUnicodeTypeR3txml.sax._exceptionstxml.saxRR6txml.sax.handlerR|R}tfeature_string_interningR~RR€R…R†tproperty_dom_nodetproperty_xml_stringtlookupRRR'tImportErrortetSAXReaderNotAvailableRRRR‰(R†R'RŒR|R}R”RŽR“R3RR~R‰RŠR€R6RR…R‹R˜RRR•RRR((Rt?#s$	C
	
ÿ

Anon7 - 2021