3 eb]@s:ddlZddlZddlZGdddeZddZddZGdd d eZGd d d eZGd d d eZ GdddeZ GdddZ Gddde Z Gddde Z GdddZGdddZGdddZGdddZddZd d!Zd"d#Zd$Zd%Zd&Zd'Zd$Zd%Zd&Zd'Zd(d)ZGd*d+d+ZGd,d-d-ZGd.d/d/Z Gd0d1d1Z!d2d3Z"Gd4d5d5Z#d6d7Z$gZ%d8d9Z&d:d;Z'dd?Z)d@dAZ*dBdCZ+dDdEZ,dFdGZ-dHdIZ.dJdKZ/dLdMZ0dNdOZ1dPdQZ2dRdSZ3dTdUZ4dVdWZ5dXdYZ6dZd[Z7d\d]Z8d^d_Z9d`daZ:dbdcZ;dddeZdjdkZ?dldmZ@dndoZAdpdqZBdrdsZCdtduZDdvdwZEdxdyZFdzd{ZGd|d}ZHd~dZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUddZVddZWddZXddZYddZZddZ[ddZ\ddZ]ddZ^ddZ_ddZ`ddZaddZbddZcddZdddZeddZfddZgddZhddZiddZjddÄZkddńZlddDŽZmddɄZndd˄Zodd̈́ZpddτZqddфZrddӄZsddՄZtddׄZuddلZvddۄZwdd݄Zxdd߄ZyddZzddZ{ddZ|ddZ}ddZ~ddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZdd Zd d Zd d ZddZddZddZddZddZddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zd<d=Zd>d?Zd@dAZdBdCZdDdEZdFdGZdHdIZdJdKZdLdMZdNdOZdPdQZdRdSZdTdUZdVdWZdXdYZdZd[Zd\d]Zd^d_Zd`daZdbdcZdddeZdfdgZdhdiZdjdkZdldmZdndoZdpdqZdrdsZÐdtduZĐdvdwZŐdxdyZƐdzd{Zǐd|d}ZȐd~dZɐddZʐddZːddZ̐ddZ͐ddZΐddZϐddZАddZѐddZҐddZӐddZԐddZՐddZ֐ddZאddZؐddZِddZڐddZېddZܐddZݐddZސddZߐddZddZddZddZddZddZddZddZddZddZddZddÄZdĐdńZdƐdDŽZdȐdɄZdʐd˄Zd̐d̈́ZdΐdτZdАdфZdҐdӄZdԐdՄZd֐dׄZdؐdلZdڐdۄZdܐd݄Zdސd߄ZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZ ddZ ddZ ddZ ddZ dd Zd d Zd d ZddZddZddZddZddZddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Z d.d/Z!d0d1Z"d2d3Z#d4d5Z$d6d7Z%d8d9Z&d:d;Z'd<d=Z(d>d?Z)d@dAZ*dBdCZ+dDdEZ,dFdGZ-dHdIZ.dJdKZ/dLdMZ0dNdOZ1dPdQZ2dRdSZ3dTdUZ4dVdWZ5dXdYZ6dZd[Z7d\d]Z8d^d_Z9d`daZ:dbdcZ;dddeZ<dfdgZ=dhdiZ>djdkZ?dldmZ@dndoZAdpdqZBdrdsZCdtduZDdvdwZEdxdyZFdzd{ZGd|d}ZHd~dZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUddZVddZWddZXddZYddZZddZ[ddZ\ddZ]ddZ^ddZ_ddZ`ddZaddZbddZcddZdddZeddZfddZgddZhddZiddZjddÄZkdĐdńZldƐdDŽZmdȐdɄZndʐd˄Zod̐d̈́ZpdΐdτZqdАdфZrdҐdӄZsdԐdՄZtd֐dׄZudؐdلZvdڐdۄZwdܐd݄Zxdސd߄ZyddZzddZ{ddZ|ddZ}ddZ~ddZddZddZddZddZddZddZddZddZddZddZddZddZddZddZdd ZGd d d eZGd d d eZGdddZGdddeZGdddeZGdddeZGdddZGdddeZGdddeZGdddeZGdddeZGd d!d!e ZGd"d#d#e ZGd$d%d%ZGd&d'd'ZGd(d)d)ZGd*d+d+e!ZGd,d-d-ZGd.d/d/ZGd0d1d1e ZGd2d3d3ZGd4d5d5e#ZGd6d7d7ZGd8d9d9eZGd:d;d;ZGd<d=d=ZdZd$Zd%Zd'Zd>Zd$Zd'Zd?Zd@ZdAZdBZdCZdDZdEZdFZdZd$Zd%ZdZd$Zd%Zd&ZdZd$Zd%Zd&Zd$Zd%Zd&Zd'ZƐdGZǐdHZȐdIZɐdJZʐdKZːdLZd$Zd%Zd&Zd'ZАdGZѐdHZҐdIZӐdJZԐdKZՐdLZ֐dMZאd>ZؐdNZِdOZڐdPZېdQZܐdRZݐdSZސdTZߐdUZd$Zd%Zd&Zd'Zd$Zd%Zd&Zd'ZdGZdHZdZd$Zd%Zd&Zd'ZdGZdHZdIZdJZdKZdLZdMZd>ZdNZdOZdPZdQZdRZdSZdTZdUZdVZdWZdXZdYZdZZd[Zd\Zd]Zd^Zd_Z d`Z d?Z daZ dbZ dcZddZdeZdfZdgZdhZdiZdjZdkZdlZdmZdnZdoZdpZdqZdrZdsZdtZduZ dvZ!dwZ"dxZ#dyZ$dzZ%d{Z&d|Z'd}Z(d~Z)dZ*d@Z+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGdZHdZIdZJdZKdZLdZMdZNdZOdZPdZQdZRdZSdZTdZUdZVdZWdZXdZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbdZcdZddZedZfdZgdZhdZidZjdZkdZldZmdZndÐZodĐZpdŐZqdƐZrdǐZsdȐZtdɐZudʐZvdːZwd̐Zxd͐ZydΐZzdϐZ{dАZ|dѐZ}dҐZ~dӐZdԐZdՐZd֐ZdאZdؐZdِZdڐZdېZdܐZdݐZdސZdߐZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZÐdZĐdZŐdZƐdZǐdZȐdZɐdZʐdZːd Z̐d!Z͐d"Zΐd#Zϐd$ZАd%Zѐd&ZҐd'ZӐd(ZԐd)ZՐd*Z֐d+Zאd,Zؐd-Zِd.Zڐd/Zېd0Zܐd1Zݐd2Zސd3Zߐd4Zd5Zd6Zd7Zd8Zd9Zd:Zd;Zd<Zd=Zd>Zd?Zd@ZdAZdBZdCZdDZdEZdFZdGZdHZdIZdJZdKZdLZdMZdNZdOZdPZdQZdRZdSZdTZdUZdVZdWZdXZdYZdZZd[Zd\Zd]Z d^Z d_Z d`Z daZ dbZdcZddZdeZdfZdgZdhZdiZdjZdkZdlZdmZdnZdoZdpZdqZdrZdsZdtZ duZ!dvZ"dwZ#dxZ$dyZ%dzZ&d{Z'd|Z(d}Z)d~Z*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGdZHdZIdZJdZKdZLdZMdZNdZOdZPdZQdZRdZSdZTdZUdZVdZWdZXdZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbdZcdZddZedZfdZgdZhdZidZjdZkdZldZmdZndÐZodĐZpdŐZqdƐZrdǐZsdȐZtdɐZudʐZvdːZwd̐Zxd͐ZydΐZzdϐZ{dАZ|dѐZ}dҐZ~dӐZdԐZdՐZd֐ZdאZdؐZdِZdڐZdېZdܐZdݐZdސZdߐZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZÐdZĐdZŐdZƐdZǐdZȐdZɐdZʐdZːd Z̐d!Z͐d"Zΐd#Zϐd$ZАd%Zѐd&ZҐd'ZӐd(ZԐd)ZՐd*Z֐d+Zאd,Zؐd-Zِd.Zڐd/Zېd0Zܐd1Zݐd2Zސd3Zߐd4Zd5Zd6Zd7Zd8Zd9Zd:Zd;Zd<Zd=Zd>Zd?Zd@ZdAZdBZdCZdDZdEZdFZdGZdHZdIZdJZdKZdLZdMZdNZdOZdPZdQZdRZdSZdTZdUZdVZdWZdXZdYZdZZd[Zd\Zd]Z d^Z d_Z d`Z daZ dbZdcZddZdeZdfZdgZdhZdiZdjZdkZdlZdmZdnZdoZdpZdqZdrZdsZdtZ duZ!dvZ"dwZ#dxZ$dyZ%dzZ&d{Z'd|Z(d}Z)d~Z*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGdZHdZIdZJdZKdZLdZMdZNdZOdZPdZQdZRdZSdZTdZUdZVdZWdZXdZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbdZcdZddZedZfdZgdZhdZidZjdZkdZldZmdZndÐZodĐZpdŐZqdƐZrdǐZsdȐZtdɐZudʐZvdːZwd̐Zxd͐ZydΐZzdϐZ{dАZ|dѐZ}dҐZ~dӐZdԐZdՐZd֐ZdאZdؐZdِZdڐZdېZdܐZdݐZdސZdߐZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZÐdZĐdZŐdZƐdZǐdZȐdZɐdZʐdZdZd$Zd%ZdZd$Zd%Zd&ZdZd$Zd%ZՐd)ZdZd$Zd%Zd&Zd'ZېdGZܐdHZݐdIZސdJZߐdKZdLZdMZd>ZdNZdOZdPZdQZdRZdSZdTZdUZdVZdWZd$Zd%Zd'ZdJZdQZd?Zd@ZdAZd$Zd%Zd&Zd'Zd$Zd%Zd&Zd'ZdZd$Zd%Zd&Zd'Zd*Zd+Zd,Zd-Zd.ZdZdZ d$Z d%Z d&Z dZ d$Zd%Zd&Zd'ZdGZd$Zd%Zd&Zd'ZdGZdHZdZd$Zd%Zd&Zd'ZdGZdHZdIZ dJZ!dKZ"dLZ#dMZ$d>Z%dNZ&dOZ'dPZ(dQZ)dRZ*dSZ+dTZ,dUZ-dVZ.dWZ/dXZ0dYZ1dZZ2d[Z3d\Z4d]Z5d^Z6d_Z7d$Z8d%Z9d/Z:dZ;d$Zd'Z?dGZ@dHZAdIZBdJZCdKZDdLZEdMZFd>ZGdNZHdOZIdPZJdQZKdRZLd$ZMd%ZNd&ZOd'ZPd$ZQd%ZRd&ZSd'ZTd$ZUd%ZVd'ZWdJZXdQZYd?ZZd@Z[dAZ\dBZ]dÐZ^dZ_dCZ`d ZadDZbd!Zcd"ZddEZed#Zfd$Zgd%Zhd&ZidFZjd'ZkdZld$Zmd%Znd&Zod'ZpdGZqdZrd$Zsd%Ztd'ZudZvd$Zwd%Zxd&Zyd'ZzdGZ{dHZ|dIZ}dJZ~dKZdLZdMZd>ZdNZdOZdPZdQZdRZdZd$Zd%ZdZd$Zd%Zd&Zd'ZdGZdHZdIZdJZdKZdLZdMZd>ZdNZdOZdPZdQZdRZdSZdTZdUZdVZdWZdXZdYZdZZd[Zd\Zd]Zd^Zd_Zd`Zd?ZdaZdbZdcZddZdeZdfZdgZd$Zd%Zd'ZdJZdQZd?Zd@ZdAZdZd$Zd%Zd&Zd'ZdGZdHZdIZdJZÐdKZĐdLZŐdMZƐd>ZǐdNZȐdOZɐdPZʐdQZːdRZ̐dSZ͐dTZΐdUZϐdVZАdWZѐdXZҐdYZӐdZZԐd[ZՐd\Z֐d]Zאd^Zؐd_Zِd`Zڐd?ZېdaZܐdbZݐdcZސddZߐdeZdfZdgZdhZdiZdjZdkZdlZdmZdnZdZd$Zd%Zd&Zd'ZdGZdHZdIZdJZdKZdLZdMZd>ZdNZdOZdPZdQZdRZdSZdTZdUZdVZdWZdXZdYZdZZd$Zd%Zd'ZdJZdBZdÐZ dZ dZ d$Z d%Z d&Zd'ZdGZdHZdIZd$Zd%Zd&Zd'ZdGZdHZdIZdJZdKZdLZdMZd>ZdNZdOZ dPZ!dQZ"dRZ#dSZ$dTZ%dUZ&dVZ'dWZ(dXZ)dYZ*dZZ+d[Z,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:d$Z;dZd&Z?dZ@d$ZAd%ZBd&ZCd'ZDdGZEd$ZFd%ZGd&ZHd'ZIdGZJdHZKdIZLdJZMdKZNdLZOdMZPd>ZQdNZRdOZSdPZTdQZUdRZVdSZWdTZXdUZYdVZZdWZ[dXZ\dYZ]dZZ^d[Z_d\Z`d]Zad^Zbd_Zcd`Zdd?ZedaZfd(ZgdZhd$Zid%Zjd&Zkd'ZldGZmdHZndIZodJZpdKZqdZrd$Zsd%Ztd&Zud'ZvdGZwdHZxdIZydJZzdKZ{dLZ|dMZ}d>Z~dNZdOZdPZdQZdRZdSZdTZdUZdVZdWZdXZdYZdZZd[ZdS(0Nc@s eZdZdS) libxmlErrorN)__name__ __module__ __qualname__rr=/opt/cpanel/ea-libxml2/lib/python3.6/site-packages/libxml2.pyrsrc Cs2y"ttj}|dkr |dkr dSWn dSdS)NZ PyCObject PyCapsuler)type_objr)objnrrr checkWrapper s rcCst|}|dkrtj|S|S)Nr)idsysmaxsize)oirrrpos_ids rc@seZdZddZddZdS) treeErrorcCs ||_dS)N)msg)selfrrrr__init__sztreeError.__init__cCs|jS)N)r)rrrr__str__!sztreeError.__str__N)rrrrrrrrrrsrc@seZdZddZddZdS) parserErrorcCs ||_dS)N)r)rrrrrr%szparserError.__init__cCs|jS)N)r)rrrrr'szparserError.__str__N)rrrrrrrrrr$src@seZdZddZddZdS)uriErrorcCs ||_dS)N)r)rrrrrr+szuriError.__init__cCs|jS)N)r)rrrrr-szuriError.__str__N)rrrrrrrrrr*src@seZdZddZddZdS) xpathErrorcCs ||_dS)N)r)rrrrrr1szxpathError.__init__cCs|jS)N)r)rrrrr3szxpathError.__str__N)rrrrrrrrrr0src@s8eZdZddZddZddZddd Zdd d Zd S) ioWrappercCs||_d|_dS)N)_ioWrapper__io_o)rr rrrr7szioWrapper.__init__cCs"|jdkrdS|jjd|_dS)Nr r)rclose)rrrrio_close;s   zioWrapper.io_closecCs|jdkrdS|jjdS)Nr rr )rflush)rrrrio_flushBs  zioWrapper.io_flushr c Cs|jdkrdSy$|dkr$|jj}n |jj|}WnLtk r~ddl}|jd}tdt|td|j|jdkdSX|S)Nr rzfailed to read from Python:zon IO:r r )rread Exceptionrexc_infoprintr )rlenretrerrrio_readHs     zioWrapper.io_readcCs0|jdkrdS|dkr"|jj|S|jj||S)Nr rr )rwrite)rstrr)rrrio_writeZs   zioWrapper.io_writeNr )r r )r )rrrrr"r$r,r/rrrrr6s  rc@s&eZdZd ddZddZddZdS) ioReadWrappercCstj||tj|||_dS)N)rr libxml2modxmlCreateInputBufferr)rr encrrrrbs zioReadWrapper.__init__cCs0td|j|jdkr&tj|jd|_dS)N__del__)r(r"rr2xmlFreeParserInputBuffer)rrrrr5fs   zioReadWrapper.__del__cCs(|j|jdkrtj|jd|_dS)N)r"rr2r6)rrrrr!ms  zioReadWrapper.closeN)r1)rrrrr5r!rrrrr0as r0c@s.eZdZd ddZddZddZdd Zd S) ioWriteWrapperr1cCst|tdkr tdd|_ntt|jdkrbtj|}|dkrNtj||n tj||||_n2tj|}|dkrtj||n tj||||_dS)Nr1zwrite io from a stringr) r r(rrr2ZoutputBufferGetPythonFilerrr)rr r4filerrrrts    zioWriteWrapper.__init__cCs(|j|jdkrtj|jd|_dS)N)r"rr2xmlOutputBufferClose)rrrrr5s  zioWriteWrapper.__del__cCs(|j|jdkrtj|jd|_dS)N)r$rr2r9)rrrrr#s  zioWriteWrapper.flushcCs(|j|jdkrtj|jd|_dS)N)r$rr2r9)rrrrr!s  zioWriteWrapper.closeN)r1)rrrrr5r#r!rrrrr7ss r7c@seZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ ddZddZddZddZddZd d!Zd"dZd#d$Zd%d&Zd'd(Zd)S)* SAXCallbackzBase class for SAX handlerscCsdS)z#called at the start of the documentNr)rrrr startDocumentszSAXCallback.startDocumentcCsdS)z!called at the end of the documentNr)rrrr endDocumentszSAXCallback.endDocumentcCsdS)zcalled at the start of every element, tag is the name of the element, attrs is a dictionary of the element's attributesNr)rtagZattrsrrr startElementszSAXCallback.startElementcCsdS)zOcalled at the start of every element, tag is the name of the elementNr)rr=rrr endElementszSAXCallback.endElementcCsdS)zcalled when character data have been read, data is the string containing the data, multiple consecutive characters() callback are possible.Nr)rdatarrr charactersszSAXCallback.characterscCsdS)zcalled when CDATA section have been read, data is the string containing the data, multiple consecutive cdataBlock() callback are possible.Nr)rr@rrr cdataBlockszSAXCallback.cdataBlockcCsdS)z.called when an entity reference has been foundNr)rnamerrr referenceszSAXCallback.referencecCsdS)z>called when potentially ignorable white spaces have been foundNr)rr@rrrignorableWhitespaceszSAXCallback.ignorableWhitespacecCsdS)zqcalled when a PI has been found, target contains the PI name and data is the associated data in the PINr)rtargetr@rrrprocessingInstructionsz!SAXCallback.processingInstructioncCsdS)zBcalled when a comment has been found, content contains the commentNr)rcontentrrrcommentszSAXCallback.commentcCsdS)zcalled when a DOCTYPE declaration has been found, name is the DTD name and externalID, systemID are the DTD public and system identifier for that DTd if availableNr)rrC externalIDsystemIDrrrexternalSubsetszSAXCallback.externalSubsetcCsdS)zcalled when a DOCTYPE declaration has been found, name is the DTD name and externalID, systemID are the DTD public and system identifier for that DTD if availableNr)rrCrJrKrrrinternalSubsetszSAXCallback.internalSubsetcCsdS)acalled when an ENTITY declaration has been found, name is the entity name and externalID, systemID are the entity public and system identifier for that entity if available, type indicates the entity type, and content reports it's string contentNr)rrCr rJrKrHrrr entityDeclszSAXCallback.entityDeclcCsdS)zcalled when an NOTATION declaration has been found, name is the notation name and externalID, systemID are the notation public and system identifier for that notation if availableNr)rrCrJrKrrr notationDeclszSAXCallback.notationDeclcCsdS)z2called when an ATTRIBUTE definition has been foundNr)relemrCr ZdefiZ defaultValueZnameListrrr attributeDeclszSAXCallback.attributeDeclcCsdS)z0called when an ELEMENT definition has been foundNr)rrCr rHrrr elementDeclszSAXCallback.elementDeclcCsdS)acalled when an unparsed ENTITY declaration has been found, name is the entity name and publicId,, systemID are the entity public and system identifier for that entity if available, and notationName indicate the associated NOTATIONNr)rrCZpublicIdrK notationNamerrrrNscCsdS)Nr)rrrrrwarningszSAXCallback.warningcCs t|dS)N)r)rrrrrerrorszSAXCallback.errorcCs t|dS)N)r)rrrrr fatalErrorszSAXCallback.fatalErrorN)rrr__doc__r;r<r>r?rArBrDrErGrIrLrMrNrOrQrRrTrUrVrrrrr:s*r:c@seZdZdCddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZeZddZddZddZd dlZeejd d!d"krd#d$Zneeddd%Zee ddd&Zee ddd'Zee ddd(Zee ddd)Zee ddd*Zeeddd+Zeeddd,Zeeddd-Z eeddd.Z!dDd/d0Z"dEd1d2Z#dFd3d4Z$dGd5d6Z%d7d8Z&d9d:Z'd;d<Z(d=d>Z)d?d@Z*e)Z+dAdBZ,dS)HxmlCoreNcCs|dkr||_dSd|_dS)N)r)rr rrrr szxmlCore.__init__cCs0|dkr dStj|j|j}|dkr(dS|dkS)NFT)r2compareNodesEqualr)rotherr*rrr__eq__s zxmlCore.__eq__cCs"|dkr dStj|j|j}| S)NT)r2rYr)rrZr*rrr__ne__szxmlCore.__ne__cCstj|j}|S)N)r2ZnodeHashr)rr*rrr__hash__s zxmlCore.__hash__cCs|jS)N) serialize)rrrrr"szxmlCore.__str__cCs tj|j}|dkrdSt|S)N)r2parentrnodeWrap)rr*rrr get_parent$s zxmlCore.get_parentcCs tj|j}|dkrdSt|S)N)r2childrenrr`)rr*rrr get_children)s zxmlCore.get_childrencCs tj|j}|dkrdSt|S)N)r2lastrr`)rr*rrrget_last.s zxmlCore.get_lastcCs tj|j}|dkrdSt|S)N)r2nextrr`)rr*rrrget_next3s zxmlCore.get_nextcCs"tj|j}|dkrdSt|dS)N)r )r2 propertiesrxmlAttr)rr*rrrget_properties8s zxmlCore.get_propertiescCs tj|j}|dkrdSt|S)N)r2prevrr`)rr*rrrget_prev=s zxmlCore.get_prevcCs tj|jS)N)r2xmlNodeGetContentr)rrrr get_contentBszxmlCore.get_contentcCs tj|jS)N)r2rCr)rrrrget_nameEszxmlCore.get_namecCs tj|jS)N)r2r r)rrrrget_typeGszxmlCore.get_typecCs8tj|j}|dkr.|jdkr*t|jdSdSt|dS)N document_xml document_html)r )rqrr)r2docrr xmlDoc)rr*rrrget_docIs    zxmlCore.get_docrg@cCs|dkr(tj|j}|dkr dSt|S|dkrRtj|j}|dkrHdSt|dS|dkrztj|j}|dkrrdSt|S|dkrtj|j}|dkrdSt|S|dkrtj|j}|dkrdSt|S|dkrtj |j}|dkrdSt|S|dkr tj |jS|d kr tj |jS|d kr6tj |jS|d krtj |j}|dkr~|j d ksn|j d krzt|jdSdSt|dSt|dS)Nr_rh)r rbrdrfrkrHrCr rsrqrr)r2r_rr`rhrirbrdrfrkrmrCr rsrtAttributeError)rattrr*rrr __getattr__WsX                   zxmlCore.__getattr__z Parent nodezFirst child nodezLast sibling nodezNext sibling nodezPrevious sibling nodezList of propertieszContent of this nodez Node namez Node typez!The document this node belongs tocCstj|j||S)N)r2Z serializeNoder)rencodingformatrrrr^szxmlCore.serializecCstj|j|||S)N)r2Z saveNodeTor)rr8rzr{rrrsaveToszxmlCore.saveTocCs2|rdd|D}tj|jj||dk||dkS)NcSsg|] }|jqSr)r).0r rrr sz&xmlCore.c14nMemory..r)r2ZxmlC14NDocDumpMemoryrur)rnodes exclusiveprefixes with_commentsrrr c14nMemoryszxmlCore.c14nMemorycCs4|rdd|D}tj|jj||dk||dk|S)NcSsg|] }|jqSr)r)r}r rrrr~sz&xmlCore.c14nSaveTo..r)r2ZxmlC14NDocSaveTorur)rr8rrrrrrr c14nSaveToszxmlCore.c14nSaveTocCs:|j}|dkrdS|j}|j||j|}|j|S)N)rsxpathNewContextsetContextNode xpathEvalxpathFreeContext)rexprrsctxtresrrrrs  zxmlCore.xpathEvalcCs |j|S)N)r)rrrrr xpathEval2szxmlCore.xpathEval2cCs(tj|j|}|dkrdSt|d}|S)a5 Remove a namespace definition from a node. If href is None, remove all of the ns definitions on that node. The removed namespaces are returned as a linked list. Note: If any child nodes referred to the removed namespaces, they will be left with dangling links. You should call renconciliateNs() to fix those pointers. Note: This method does not free memory taken by the ns definitions. You will need to free it manually with the freeNsList() method on the returns xmlNs object. N)r )r2ZxmlNodeRemoveNsDefrxmlNs)rhrefr*Z _xmlCore__tmprrr removeNsDefs  zxmlCore.removeNsDefcCst|S)N)xmlCoreDepthFirstItertor)rrrrwalk_depth_firstszxmlCore.walk_depth_firstcCst|S)N)xmlCoreBreadthFirstItertor)rrrrwalk_breadth_firstszxmlCore.walk_breadth_firstc Cs.y|jjjWn YnXtj|jdS)N)rsZ_ctxtrr2 xmlFreeDocr)rrrrfrees z xmlCore.free)N)Nr)Nr)NrNr)NrNr)-rrrrr[r\r]rrarcrergrjrlrn getContentrorprurfloatversionrypropertyr_rbrdrfrkrhrHrCr rsr^r|rrrrrrr__iter__rrrrrrX s\   /    rXc@s(eZdZddZddZddZeZdS)rcCs||_g|_dS)N)nodeparents)rrrrrrsz!xmlCoreDepthFirstItertor.__init__cCs|S)Nr)rrrrrsz!xmlCoreDepthFirstItertor.__iter__c Csbx\|jr*|j}|jj|j|jj|_|Sy|jj}Wntk rPtYnX|j|_qWdS)N)rrappendrbpop IndexError StopIterationrf)rr*r_rrr__next__s  z!xmlCoreDepthFirstItertor.__next__N)rrrrrrrfrrrrrs rc@s(eZdZddZddZddZeZdS)rcCs||_g|_dS)N)rr)rrrrrr'sz#xmlCoreBreadthFirstItertor.__init__cCs|S)Nr)rrrrr*sz#xmlCoreBreadthFirstItertor.__iter__c Csbx\|jr*|j}|jj|j|jj|_|Sy|jj}Wntk rPtYnX|j|_qWdS)N)rrrrfrrrrb)rr*r_rrrr,s  z#xmlCoreBreadthFirstItertor.__next__N)rrrrrrrfrrrrr&s rcCstj|}|dks|dkr$t|dS|dkr6t|dS|dddkrPt|dS|dkrbt|dS|d krtt|dS|d krt|dS|d krt|dS|d krt |dSt|dS) Nelementtext)r Z attributerZdocument namespaceZ elem_declZattribute_declZ entity_decldtd) r2r xmlNoderirtr xmlElement xmlAttribute xmlEntityxmlDtd)rrCrrrr`=s$         r`cCs|t|}|tgkr&ttt|}|S|tfkrHttt|}t|S|tdksl|tdksl|tdkrp|St|SdS)Nr1rg)r listmapxpathObjectRettupler`)rZotyper*rrrrRs  $rcCstj||||}dS)N)r2xmlRegisterXPathFunction)rrCns_urifr*rrrregisterXPathFunctionbsrr rvcCs8ddl}d|jkr tj||}nddl}|j||}|S)zpRegister a Python written function to for error reporting. The function is called back as f(ctx, error). rNlibxslt)rmodulesr2ZxmlRegisterErrorHandlerrregisterErrorHandler)rctxrr*rrrrrxs   rc@s6eZdZd ddZddZddZdd Zd d ZdS) parserCtxtCoreNcCs|dkr||_dSd|_dS)N)r)rr rrrrszparserCtxtCore.__init__cCs |jdkrtj|jd|_dS)N)rr2xmlFreeParserCtxt)rrrrr5s  zparserCtxtCore.__del__cCstj|j||dS)zRegister an error handler that will be called back as f(arg,msg,severity,reserved). @reserved is currently always None.N)r2ZxmlParserCtxtSetErrorHandlerr)rrargrrrsetErrorHandlerszparserCtxtCore.setErrorHandlercCs tj|jS)zWReturn (f,arg) as previously registered with setErrorHandler or (None,None).)r2ZxmlParserCtxtGetErrorHandlerr)rrrrgetErrorHandlerszparserCtxtCore.getErrorHandlercCstj|j|S)z(Register a local catalog with the parser)r2addLocalCatalogr)rurirrrrszparserCtxtCore.addLocalCatalog)N)rrrrr5rrrrrrrrs  rc@seZdZddZdddZdS) ValidCtxtCorecOsdS)Nr)rargskwrrrrszValidCtxtCore.__init__NcCstj|j|||dS)zy Register error and warning handlers for DTD validation. These will be called back as f(msg,arg) N)r2ZxmlSetValidErrorsr)rerr_func warn_funcrrrrsetValidityErrorHandlersz%ValidCtxtCore.setValidityErrorHandler)N)rrrrrrrrrrsrc@seZdZddZdddZdS)SchemaValidCtxtCorecOsdS)Nr)rrrrrrrszSchemaValidCtxtCore.__init__NcCstj|j|||dS)z| Register error and warning handlers for Schema validation. These will be called back as f(msg,arg) N)r2ZxmlSchemaSetValidErrorsr)rrrrrrrrsz+SchemaValidCtxtCore.setValidityErrorHandler)N)rrrrrrrrrrsrc@seZdZddZdddZdS)relaxNgValidCtxtCorecOsdS)Nr)rrrrrrrszrelaxNgValidCtxtCore.__init__NcCstj|j|||dS)z} Register error and warning handlers for RelaxNG validation. These will be called back as f(msg,arg) N)r2ZxmlRelaxNGSetValidErrorsr)rrrrrrrrsz,relaxNgValidCtxtCore.setValidityErrorHandler)N)rrrrrrrrrrsrcCs|\}}||||t|S)z)Intermediate callback to wrap the locator)xmlTextReaderLocator)Zxxx_todo_changemerZseverityZlocatorrrrrr_xmlTextReaderErrorFuncsrc@s.eZdZd ddZddZddZdd ZdS) xmlTextReaderCoreNcCs"d|_|dkr||_dSd|_dS)N)inputr)rr rrrrs zxmlTextReaderCore.__init__cCs |jdkrtj|jd|_dS)N)rr2xmlFreeTextReader)rrrrr5s  zxmlTextReaderCore.__del__cCs2|dkrtj|jddntj|jt||fdS)z]Register an error handler that will be called back as f(arg,msg,severity,locator).N)r2ZxmlTextReaderSetErrorHandlerrr)rrrrrrSetErrorHandlers z!xmlTextReaderCore.SetErrorHandlercCs$tj|j\}}|dkrdS|SdS)zWReturn (f,arg) as previously registered with setErrorHandler or (None,None).N)NN)r2ZxmlTextReaderGetErrorHandlerr)rrrrrrGetErrorHandlersz!xmlTextReaderCore.GetErrorHandler)N)rrrrr5rrrrrrrs  rcCs tjdS)N)r2xmlPythonCleanupParserrrrr cleanupParsersrcCs dd}tj|tj|dS)NcSs*x$ttD]}||}|dk r |Sq WdS)N)reversed__input_callbacks)URIcbrrrrfindOpenCallbacksz/registerInputCallback..findOpenCallback)r2ZxmlRegisterInputCallbackrr)funcrrrrregisterInputCallbacks rcCs,ttdkrtjttdkr(tjdS)Nr)r)rrr2ZxmlUnregisterInputCallbackrrrrpopInputCallbackss  rcCs&tj||}|dkrtdt|dS)zCreate a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Nz!htmlCreateFileParserCtxt() failed)r )r2htmlCreateFileParserCtxtr parserCtxt)filenamerzr*rrrrs rcCs&tj||}|dkrtdt|dS)z8Create a parser context for an HTML in-memory document. Nz#htmlCreateMemoryParserCtxt() failed)r )r2htmlCreateMemoryParserCtxtrr)buffersizer*rrrr!s rcCstj|}|S)zISet and return the previous value for handling HTML omitted tags. )r2htmlHandleOmittedElem)valr*rrrr's rcCs tjdS)zDEPRECATED: This is a no-op. N)r2htmlInitAutoCloserrrrr-srcCstj|}|S)z0Check if an attribute is of content type Script )r2htmlIsScriptAttribute)rCr*rrrr1s rcCs"tj}|dkrtdt|dS)z.Allocate and initialize a new parser context. NzhtmlNewParserCtxt() failed)r )r2htmlNewParserCtxtrr)r*rrrr6srcCs&tj||}|dkrtdt|dS)z3parse an HTML in-memory document and build a tree. NzhtmlParseDoc() failed)r )r2 htmlParseDocrrt)currzr*rrrr<s rcCs&tj||}|dkrtdt|dS)zparse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. NzhtmlParseFile() failed)r )r2 htmlParseFilerrt)rrzr*rrrrBs rcCs*tj||||}|dkr tdt|dS)z2parse an XML in-memory document and build a tree. NzhtmlReadDoc() failed)r )r2 htmlReadDocrrt)rURLrzoptionsr*rrrrJsrcCs*tj||||}|dkr tdt|dS)zparse an HTML from a file descriptor and build a tree. NOTE that the file descriptor will not be closed when the reader is closed or reset. NzhtmlReadFd() failed)r )r2 htmlReadFdrrt)fdrrzrr*rrrrPsrcCs(tj|||}|dkrtdt|dS)z6parse an XML file from the filesystem or the network. NzhtmlReadFile() failed)r )r2 htmlReadFilerrt)rrzrr*rrrrXsrcCs,tj|||||}|dkr"tdt|dS)z2parse an XML in-memory document and build a tree. NzhtmlReadMemory() failed)r )r2htmlReadMemoryrrt)rrrrzrr*rrrr^srcCstj|}|S)z7Determine if a given attribute is a boolean attribute. )r2htmlIsBooleanAttr)rCr*rrrrhs rcCs&tj||}|dkrtdt|dS)zCreates a new HTML document NzhtmlNewDoc() failed)r )r2 htmlNewDocrrt)r ExternalIDr*rrrrms rcCs&tj||}|dkrtdt|dS)zWCreates a new HTML document without a DTD node if @URI and @ExternalID are None NzhtmlNewDocNoDtD() failed)r )r2htmlNewDocNoDtDrrt)rrr*rrrrss rcCstj|}|S)aKDEPRECATED: Use parser option XML_PARSE_SAX1. Set the default version of SAX used globally by the library. By default, during initialization the default is set to 2. Note that it is generally a better coding style to use xmlSAXVersion() to set up the version explicitly for a given parsing context. )r2ZxmlSAXDefaultVersion)rr*rrrSAXDefaultVersion~s rcCs tjdS)zDEPRECATED: This function is a no-op. Call xmlInitParser to initialize the library. Initialize the default SAX2 handler N)r2ZxmlDefaultSAXHandlerInitrrrrdefaultSAXHandlerInitsrcCs tjdS)z[DEPRECATED: This function is a no-op. Call xmlInitParser to initialize the library. N)r2htmlDefaultSAXHandlerInitrrrrrsrcCstj|||}|S)zAdd an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog(); )r2Z xmlCatalogAdd)r origreplacer*rrr catalogAddsrcCs tjdS)z0Free up all the memory associated with catalogs N)r2ZxmlCatalogCleanuprrrrcatalogCleanupsrcCs tj}|S)z1Convert all the SGML catalog entries as XML ones )r2ZxmlCatalogConvert)r*rrrcatalogConvertsrcCs|dk r|jtj|dS)z7Dump all the global catalog content to the given file. N)r#r2ZxmlCatalogDump)outrrr catalogDumpsrcCstj|}|S)zoTry to lookup the catalog reference associated to a public ID DEPRECATED, use xmlCatalogResolvePublic() )r2ZxmlCatalogGetPublic)pubIDr*rrrcatalogGetPublics rcCstj|}|S)zoTry to lookup the catalog reference associated to a system ID DEPRECATED, use xmlCatalogResolveSystem() )r2ZxmlCatalogGetSystem)sysIDr*rrrcatalogGetSystems rcCstj|}|S)z!Remove an entry from the catalog )r2ZxmlCatalogRemove)valuer*rrr catalogRemoves rcCstj||}|S)z:Do a complete resolution lookup of an External Identifier )r2ZxmlCatalogResolve)rrr*rrrcatalogResolves rcCstj|}|S)zETry to lookup the catalog reference associated to a public ID )r2ZxmlCatalogResolvePublic)rr*rrrcatalogResolvePublics rcCstj|}|S)z3Try to lookup the catalog resource for a system ID )r2ZxmlCatalogResolveSystem)rr*rrrcatalogResolveSystems rcCstj|}|S)z*Do a complete resolution lookup of an URI )r2ZxmlCatalogResolveURI)rr*rrrcatalogResolveURIs rcCstj|}|S)z[Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it )r2ZxmlCatalogSetDebug)levelr*rrrcatalogSetDebugs rcCs tjdS)zDo the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup N)r2ZxmlInitializeCatalogrrrrinitializeCatalogsr cCs$tj|}|dkrtdt|dS)zLoad the catalog and build the associated data structures. This can be either an XML Catalog or an SGML Catalog It will recurse in SGML CATALOG entries. On the other hand XML Catalogs are not handled recursively. NzxmlLoadACatalog() failed)r )r2ZxmlLoadACatalogrcatalog)rr*rrr loadACatalogs r cCstj|}|S)zLoad the catalog and makes its definitions effective for the default external entity loader. It will recurse in SGML CATALOG entries. this function is not thread safe, catalog initialization should preferably be done once at startup )r2ZxmlLoadCatalog)rr*rrr loadCatalogs r cCstj|dS)zLoad the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup N)r2ZxmlLoadCatalogs)Zpathssrrr loadCatalogssr cCs$tj|}|dkrtdt|dS)zLoad an SGML super catalog. It won't expand CATALOG or DELEGATE references. This is only needed for manipulating SGML Super Catalogs like adding and removing CATALOG or DELEGATE entries. Nz xmlLoadSGMLSuperCatalog() failed)r )r2ZxmlLoadSGMLSuperCatalogrr )rr*rrrloadSGMLSuperCatalogs rcCs$tj|}|dkrtdt|dS)zcreate a new Catalog. NzxmlNewCatalog() failed)r )r2Z xmlNewCatalogrr )Zsgmlr*rrr newCatalogs rcCs$tj|}|dkrtdt|dS)zjparse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups. NzxmlParseCatalogFile() failed)r )r2ZxmlParseCatalogFilerrt)rr*rrrparseCatalogFiles rcCstj|}|S)zSThis function is DEPRECATED. Use xmlIsBaseChar_ch or xmlIsBaseCharQ instead )r2Z xmlIsBaseChar)chr*rrr isBaseChars rcCstj|}|S)zMThis function is DEPRECATED. Use xmlIsBlank_ch or xmlIsBlankQ instead )r2Z xmlIsBlank)rr*rrrisBlanks rcCstj|}|S)zKThis function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ instead )r2Z xmlIsChar)rr*rrrisChars rcCstj|}|S)z9This function is DEPRECATED. Use xmlIsCombiningQ instead )r2ZxmlIsCombining)rr*rrr isCombining"s rcCstj|}|S)zMThis function is DEPRECATED. Use xmlIsDigit_ch or xmlIsDigitQ instead )r2Z xmlIsDigit)rr*rrrisDigit's rcCstj|}|S)zSThis function is DEPRECATED. Use xmlIsExtender_ch or xmlIsExtenderQ instead )r2Z xmlIsExtender)rr*rrr isExtender-s rcCstj|}|S)z;This function is DEPRECATED. Use xmlIsIdeographicQ instead )r2ZxmlIsIdeographic)rr*rrr isIdeographic3s rcCstj|}|S)zUThis function is DEPRECATED. Use xmlIsPubidChar_ch or xmlIsPubidCharQ instead )r2ZxmlIsPubidChar)rr*rrr isPubidChar8s rcCstj|}|S)z&Convenient way to turn bool into text )r2Z xmlBoolToText)Zboolvalr*rrr boolToTextBs rcCs |dk r|jtj||dS)zcCs$tj|}|dkrtdt|dS)zDEPRECATED: Use xmlReadFile. parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. NzxmlParseFile() failed)r )r2Z xmlParseFilerrt)rr*rrr parseFile"s r?cCs&tj||}|dkrtdt|dS)zVDEPRECATED: Use xmlReadMemory. parse an XML in-memory block and build a tree. NzxmlParseMemory() failed)r )r2ZxmlParseMemoryrrt)rrr*rrr parseMemory*s r@cCstj|}|S)zDEPRECATED: Use the modern options API with XML_PARSE_PEDANTIC. Set and return the previous value for enabling pedantic warnings. )r2ZxmlPedanticParserDefault)rr*rrrpedanticParserDefault1s rAcCs*tj||||}|dkr tdt|dS)z2parse an XML in-memory document and build a tree. NzxmlReadDoc() failed)r )r2Z xmlReadDocrrt)rrrzrr*rrrreadDoc8srBcCs*tj||||}|dkr tdt|dS)zparse an XML from a file descriptor and build a tree. NOTE that the file descriptor will not be closed when the reader is closed or reset. NzxmlReadFd() failed)r )r2Z xmlReadFdrrt)rrrzrr*rrrreadFd>srCcCs(tj|||}|dkrtdt|dS)z6parse an XML file from the filesystem or the network. NzxmlReadFile() failed)r )r2Z xmlReadFilerrt)rrzrr*rrrreadFileFsrDcCs,tj|||||}|dkr"tdt|dS)z2parse an XML in-memory document and build a tree. NzxmlReadMemory() failed)r )r2Z xmlReadMemoryrrt)rrrrzrr*rrr readMemoryLsrEcCs$tj|}|dkrtdt|dS)zDEPRECATED: Use xmlReadDoc with XML_PARSE_RECOVER. parse an XML in-memory document and build a tree. In the case the document is not Well Formed, a attempt to build a tree is tried anyway NzxmlRecoverDoc() failed)r )r2Z xmlRecoverDocrrt)rr*rrr recoverDocRs rFcCs$tj|}|dkrtdt|dS)a+DEPRECATED: Use xmlReadFile with XML_PARSE_RECOVER. parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway NzxmlRecoverFile() failed)r )r2ZxmlRecoverFilerrt)rr*rrr recoverFile[s rGcCs&tj||}|dkrtdt|dS)zDEPRECATED: Use xmlReadMemory with XML_PARSE_RECOVER. parse an XML in-memory block and build a tree. In the case the document is not Well Formed, an attempt to build a tree is tried anyway NzxmlRecoverMemory() failed)r )r2ZxmlRecoverMemoryrrt)rrr*rrr recoverMemoryes rHcCstj|}|S)aDEPRECATED: Use the modern options API with XML_PARSE_NOENT. Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output. This function has to be used to change the default parser behavior SAX::substituteEntities() has to be used for changing that on a file by file basis. )r2ZxmlSubstituteEntitiesDefault)rr*rrrsubstituteEntitiesDefaultns rIcCstj|}|S)N)r2Z'xmlThrDefDoValidityCheckingDefaultValue)vr*rrr$thrDefDoValidityCheckingDefaultValueys rKcCstj|}|S)N)r2Z xmlThrDefGetWarningsDefaultValue)rJr*rrrthrDefGetWarningsDefaultValue}s rLcCstj|}|S)N)r2ZxmlThrDefKeepBlanksDefaultValue)rJr*rrrthrDefKeepBlanksDefaultValues rMcCstj|}|S)N)r2Z xmlThrDefLineNumbersDefaultValue)rJr*rrrthrDefLineNumbersDefaultValues rNcCstj|}|S)N)r2ZxmlThrDefLoadExtDtdDefaultValue)rJr*rrrthrDefLoadExtDtdDefaultValues rOcCstj|}|S)N)r2ZxmlThrDefParserDebugEntities)rJr*rrrthrDefParserDebugEntitiess rPcCstj|}|S)N)r2Z#xmlThrDefPedanticParserDefaultValue)rJr*rrr thrDefPedanticParserDefaultValues rQcCstj|}|S)N)r2Z'xmlThrDefSubstituteEntitiesDefaultValue)rJr*rrr$thrDefSubstituteEntitiesDefaultValues rRcCstj|}|S)aeDEPRECATED: Internal function, do not use. Checks that the value conforms to the LanguageID production: NOTE: this is somewhat deprecated, those productions were removed from the XML Second edition. [33] LanguageID ::= Langcode ('-' Subcode)* [34] Langcode ::= ISO639Code | IanaCode | UserCode [35] ISO639Code ::= ([a-z] | [A-Z]) ([a-z] | [A-Z]) [36] IanaCode ::= ('i' | 'I') '-' ([a-z] | [A-Z])+ [37] UserCode ::= ('x' | 'X') '-' ([a-z] | [A-Z])+ [38] Subcode ::= ([a-z] | [A-Z])+ The current REC reference the successors of RFC 1766, currently 5646 http://www.rfc-editor.org/rfc/rfc5646.txt langtag = language ["-" script] ["-" region] *("-" variant) *("-" extension) ["-" privateuse] language = 2*3ALPHA ; shortest ISO 639 code ["-" extlang] ; sometimes followed by ; extended language subtags / 4ALPHA ; or reserved for future use / 5*8ALPHA ; or registered language subtag extlang = 3ALPHA ; selected ISO 639 codes *2("-" 3ALPHA) ; permanently reserved script = 4ALPHA ; ISO 15924 code region = 2ALPHA ; ISO 3166-1 code / 3DIGIT ; UN M.49 code variant = 5*8alphanum ; registered variants / (DIGIT 3alphanum) extension = singleton 1*("-" (2*8alphanum)) ; Single alphanumerics ; "x" reserved for private use singleton = DIGIT ; 0 - 9 / %x41-57 ; A - W / %x59-5A ; Y - Z / %x61-77 ; a - w / %x79-7A ; y - z it sounds right to still allow Irregular i-xxx IANA and user codes too The parser below doesn't try to cope with extension or privateuse that could be added but that's not interoperable anyway )r2ZxmlCheckLanguageID)langr*rrrcheckLanguageIDs rTcCstj|||}|S)z#append the char value in the array )r2Z xmlCopyChar)r)rrr*rrrcopyCharsrUcCstj||}|S)z#append the char value in the array )r2ZxmlCopyCharMultiByte)rrr*rrrcopyCharMultiBytes rVcCs(tj|||}|dkrtdt|dS)zCreate a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Nz"xmlCreateEntityParserCtxt() failed)r )r2ZxmlCreateEntityParserCtxtrr)rIDbaser*rrrcreateEntityParserCtxtsrYcCs$tj|}|dkrtdt|dS)zCreate a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. Nz xmlCreateFileParserCtxt() failed)r )r2ZxmlCreateFileParserCtxtrr)rr*rrrcreateFileParserCtxts rZcCs&tj||}|dkrtdt|dS)z7Create a parser context for an XML in-memory document. Nz"xmlCreateMemoryParserCtxt() failed)r )r2ZxmlCreateMemoryParserCtxtrr)rrr*rrrcreateMemoryParserCtxts r[cCs&tj||}|dkrtdt|dS)zCreate a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses NzxmlCreateURLParserCtxt() failed)r )r2ZxmlCreateURLParserCtxtrr)rrr*rrrcreateURLParserCtxts r\cCstj|}|S)zgCheck whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic )r2Z xmlIsLetter)cr*rrrisLetters r^cCs"|dkrd}n|j}tj|}|S)zaDEPRECATED: Internal function, do not use. Pops the top element name from the name stack N)rr2namePop)rctxt__or*rrrr_s  r_cCs$|dkrd}n|j}tj||}|S)zfDEPRECATED: Internal function, do not use. Pushes a new element name on top of the name stack N)rr2namePush)rrr`r*rrrras  racCs8|dkrd}n|j}tj|}|dkr.tdt|dS)zaDEPRECATED: Internal function, do not use. Pops the top element node from the node stack NznodePop() failed)r )rr2nodePoprr)rr`r*rrrrbs rbcCs8|dkrd}n|j}|dkr"d}n|j}tj||}|S)zfDEPRECATED: Internal function, do not use. Pushes a new element node on top of the node stack N)rr2nodePush)rrr`Zvalue__or*rrrrcs rccCstj|||dS)zmInterface to parse an XML file or resource pointed by an URI to build an event flow to the SAX object N)r2ZxmlSAXParseFile)SAXrZrecoverrrr SAXParseFilesrecCs&tj||}|dkrtdt|dS)z1Create a libxml2 input buffer from a Python file NzxmlCreateInputBuffer() failed)r )r2r3r inputBuffer)r8rzr*rrrcreateInputBuffers rgcCs&tj||}|dkrtdt|dS)z2Create a libxml2 output buffer from a Python file NzxmlCreateOutputBuffer() failed)r )r2ZxmlCreateOutputBufferr outputBuffer)r8rzr*rrrcreateOutputBuffer!s ricCs*tj||||}|dkr tdt|dS)zCreate a progressive XML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise. NzxmlCreatePushParser() failed)r )r2ZxmlCreatePushParserrr)rdchunkrrr*rrrcreatePushParser'srkcCstj|}|S)zSwitch on the generation of line number for elements nodes. Also returns the number of bytes allocated and not freed by libxml2 since memory debugging was switched on. )r2ZxmlDebugMemory)Zactivater*rrr debugMemory/s rlcCs tjdS)z/dump the memory allocated in the file .memdump N)r2Z xmlDumpMemoryrrrr dumpMemory6srmcCs*tj||||}|dkr tdt|dS)zCreate a progressive HTML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise. NzhtmlCreatePushParser() failed)r )r2htmlCreatePushParserrr)rdrjrrr*rrrrn:srncCstj|||dS)znInterface to parse an HTML file or resource pointed by an URI to build an event flow to the SAX object N)r2htmlSAXParseFile)rdrrzrrrroBsrocCs tj}|S)z8Returns the total amount of memory allocated by libxml2 )r2Z xmlMemoryUsed)r*rrr memoryUsedGsrpcCs$tj|}|dkrtdt|dS)zCreate a new Node NzxmlNewNode() failed)r )r2Z xmlNewNoderr)rCr*rrrnewNodeLs rqcCs tjdS)aCleanup function for the XML library. It tries to reclaim all parsing related global memory allocated for the library processing. It doesn't deallocate any document related memory. Calling this function should not prevent reusing the library but one should call xmlCleanupParser() only when the process has finished using the library or XML document built with it. N)r2rrrrrpythonCleanupParserRsrrcCstj|}|S)z-Set the entity resolver as a python function )r2ZxmlSetEntityLoader)Zresolverr*rrrsetEntityLoader\s rscCs tjdS)aPDEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all. Cleanup the default Schemas type library associated to RelaxNG N)r2ZxmlRelaxNGCleanupTypesrrrrrelaxNGCleanupTypesesrtcCs tj}|S)z'Initialize the default type libraries. )r2ZxmlRelaxNGInitTypes)r*rrrrelaxNGInitTypesnsrucCs&tj||}|dkrtdt|dS)zmCreate an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file. Nz#xmlRelaxNGNewMemParserCtxt() failed)r )r2ZxmlRelaxNGNewMemParserCtxtrrelaxNgParserCtxt)rrr*rrrrelaxNGNewMemParserCtxtss rwcCs$tj|}|dkrtdt|dS)zmCreate an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file. Nz xmlRelaxNGNewParserCtxt() failed)r )r2ZxmlRelaxNGNewParserCtxtrrv)rr*rrrrelaxNGNewParserCtxtzs rxcCstj||||}|S)zBuilds the QName @prefix:@ncname in @memory if there is enough space and prefix is not None nor empty, otherwise allocate a new string. If prefix is None or empty it returns ncname. )r2Z xmlBuildQName)ZncnameprefixZmemoryr)r*rrr buildQNamesrzcCs tj}|S)z3get the default compression mode used, ZLIB based. )r2ZxmlGetCompressMode)r*rrr compressModesr{cCstj||}|S)z7Try to find if the document correspond to an XHTML DTD )r2Z xmlIsXHTML)rKZpublicIDr*rrrisXHTMLs r|cCs$tj|}|dkrtdt|dS)z}Use of this function is DISCOURAGED in favor of xmlNewDocComment. Creation of a new node containing a comment. NzxmlNewComment() failed)r )r2Z xmlNewCommentrr)rHr*rrr newComments r}cCs$tj|}|dkrtdt|dS)zCreates a new XML document NzxmlNewDoc() failed)r )r2Z xmlNewDocrrt)rr*rrrnewDocs r~cCs&tj||}|dkrtdt|dS)zsCreation of a processing instruction element. Use of this function is DISCOURAGED in favor of xmlNewDocPI. NzxmlNewPI() failed)r )r2ZxmlNewPIrr)rCrHr*rrrnewPIs rcCs$tj|}|dkrtdt|dS)zdCreation of a new text node. Use of this function is DISCOURAGED in favor of xmlNewDocText. NzxmlNewText() failed)r )r2Z xmlNewTextrr)rHr*rrrnewTexts rcCs&tj||}|dkrtdt|dS)zUse of this function is DISCOURAGED in favor of xmlNewDocTextLen. Creation of a new text node with an extra parameter for the content's length NzxmlNewTextLen() failed)r )r2Z xmlNewTextLenrr)rHr)r*rrr newTextLens rcCstj|dS)zqset the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression) N)r2ZxmlSetCompressMode)moderrrsetCompressModesrcCstj|}|S)N)r2ZxmlThrDefDefaultBufferSize)rJr*rrrthrDefDefaultBufferSizes rcCstj||}|S)z;Check that a value conforms to the lexical space of NCName )r2ZxmlValidateNCName)rspacer*rrrvalidateNCNames rcCstj||}|S)z s rcCstj|}|S)z7Check whether the character is part of Nd UCS Category )r2Z xmlUCSIsCatNd)rr*rrr uCSIsCatNdC s rcCstj|}|S)z7Check whether the character is part of Nl UCS Category )r2Z xmlUCSIsCatNl)rr*rrr uCSIsCatNlH s rcCstj|}|S)z7Check whether the character is part of No UCS Category )r2Z xmlUCSIsCatNo)rr*rrr uCSIsCatNoM s rcCstj|}|S)z6Check whether the character is part of P UCS Category )r2Z xmlUCSIsCatP)rr*rrr uCSIsCatPR s rcCstj|}|S)z7Check whether the character is part of Pc UCS Category )r2Z xmlUCSIsCatPc)rr*rrr uCSIsCatPcW s rcCstj|}|S)z7Check whether the character is part of Pd UCS Category )r2Z xmlUCSIsCatPd)rr*rrr uCSIsCatPd\ s rcCstj|}|S)z7Check whether the character is part of Pe UCS Category )r2Z xmlUCSIsCatPe)rr*rrr uCSIsCatPea s rcCstj|}|S)z7Check whether the character is part of Pf UCS Category )r2Z xmlUCSIsCatPf)rr*rrr uCSIsCatPff s rcCstj|}|S)z7Check whether the character is part of Pi UCS Category )r2Z xmlUCSIsCatPi)rr*rrr uCSIsCatPik s rcCstj|}|S)z7Check whether the character is part of Po UCS Category )r2Z xmlUCSIsCatPo)rr*rrr uCSIsCatPop s rcCstj|}|S)z7Check whether the character is part of Ps UCS Category )r2Z xmlUCSIsCatPs)rr*rrr uCSIsCatPsu s rcCstj|}|S)z6Check whether the character is part of S UCS Category )r2Z xmlUCSIsCatS)rr*rrr uCSIsCatSz s rcCstj|}|S)z7Check whether the character is part of Sc UCS Category )r2Z xmlUCSIsCatSc)rr*rrr uCSIsCatSc s rcCstj|}|S)z7Check whether the character is part of Sk UCS Category )r2Z xmlUCSIsCatSk)rr*rrr uCSIsCatSk s rcCstj|}|S)z7Check whether the character is part of Sm UCS Category )r2Z xmlUCSIsCatSm)rr*rrr uCSIsCatSm s rcCstj|}|S)z7Check whether the character is part of So UCS Category )r2Z xmlUCSIsCatSo)rr*rrr uCSIsCatSo s rcCstj|}|S)z6Check whether the character is part of Z UCS Category )r2Z xmlUCSIsCatZ)rr*rrr uCSIsCatZ s rcCstj|}|S)z7Check whether the character is part of Zl UCS Category )r2Z xmlUCSIsCatZl)rr*rrr uCSIsCatZl s r cCstj|}|S)z7Check whether the character is part of Zp UCS Category )r2Z xmlUCSIsCatZp)rr*rrr uCSIsCatZp s r cCstj|}|S)z7Check whether the character is part of Zs UCS Category )r2Z xmlUCSIsCatZs)rr*rrr uCSIsCatZs s r cCstj|}|S)z:Check whether the character is part of Cherokee UCS Block )r2ZxmlUCSIsCherokee)rr*rrr uCSIsCherokee s r cCstj|}|S)zRCheck whether the character is part of CombiningDiacriticalMarks UCS Block )r2Z!xmlUCSIsCombiningDiacriticalMarks)rr*rrruCSIsCombiningDiacriticalMarks s r cCstj|}|S)z\Check whether the character is part of CombiningDiacriticalMarksforSymbols UCS Block )r2Z+xmlUCSIsCombiningDiacriticalMarksforSymbols)rr*rrr(uCSIsCombiningDiacriticalMarksforSymbols s rcCstj|}|S)zKCheck whether the character is part of CombiningHalfMarks UCS Block )r2ZxmlUCSIsCombiningHalfMarks)rr*rrruCSIsCombiningHalfMarks s rcCstj|}|S)zQCheck whether the character is part of CombiningMarksforSymbols UCS Block )r2Z xmlUCSIsCombiningMarksforSymbols)rr*rrruCSIsCombiningMarksforSymbols s rcCstj|}|S)zHCheck whether the character is part of ControlPictures UCS Block )r2ZxmlUCSIsControlPictures)rr*rrruCSIsControlPictures s rcCstj|}|S)zHCheck whether the character is part of CurrencySymbols UCS Block )r2ZxmlUCSIsCurrencySymbols)rr*rrruCSIsCurrencySymbols s rcCstj|}|S)zICheck whether the character is part of CypriotSyllabary UCS Block )r2ZxmlUCSIsCypriotSyllabary)rr*rrruCSIsCypriotSyllabary s rcCstj|}|S)z:Check whether the character is part of Cyrillic UCS Block )r2ZxmlUCSIsCyrillic)rr*rrr uCSIsCyrillic s rcCstj|}|S)zKCheck whether the character is part of CyrillicSupplement UCS Block )r2ZxmlUCSIsCyrillicSupplement)rr*rrruCSIsCyrillicSupplement s rcCstj|}|S)z9Check whether the character is part of Deseret UCS Block )r2ZxmlUCSIsDeseret)rr*rrr uCSIsDeseret s rcCstj|}|S)z s r'cCstj|}|S)zHCheck whether the character is part of HangulSyllables UCS Block )r2ZxmlUCSIsHangulSyllables)rr*rrruCSIsHangulSyllablesC s r(cCstj|}|S)z9Check whether the character is part of Hanunoo UCS Block )r2ZxmlUCSIsHanunoo)rr*rrr uCSIsHanunooI s r)cCstj|}|S)z8Check whether the character is part of Hebrew UCS Block )r2ZxmlUCSIsHebrew)rr*rrr uCSIsHebrewN s r*cCstj|}|S)zQCheck whether the character is part of HighPrivateUseSurrogates UCS Block )r2Z xmlUCSIsHighPrivateUseSurrogates)rr*rrruCSIsHighPrivateUseSurrogatesS s r+cCstj|}|S)zGCheck whether the character is part of HighSurrogates UCS Block )r2ZxmlUCSIsHighSurrogates)rr*rrruCSIsHighSurrogatesY s r,cCstj|}|S)z:Check whether the character is part of Hiragana UCS Block )r2ZxmlUCSIsHiragana)rr*rrr uCSIsHiragana_ s r-cCstj|}|S)zFCheck whether the character is part of IPAExtensions UCS Block )r2ZxmlUCSIsIPAExtensions)rr*rrruCSIsIPAExtensionsd s r.cCstj|}|S)zYCheck whether the character is part of IdeographicDescriptionCharacters UCS Block )r2Z(xmlUCSIsIdeographicDescriptionCharacters)rr*rrr%uCSIsIdeographicDescriptionCharactersj s r/cCstj|}|S)z8Check whether the character is part of Kanbun UCS Block )r2ZxmlUCSIsKanbun)rr*rrr uCSIsKanbunp s r0cCstj|}|S)zGCheck whether the character is part of KangxiRadicals UCS Block )r2ZxmlUCSIsKangxiRadicals)rr*rrruCSIsKangxiRadicalsu s r1cCstj|}|S)z9Check whether the character is part of Kannada UCS Block )r2ZxmlUCSIsKannada)rr*rrr uCSIsKannada{ s r2cCstj|}|S)z:Check whether the character is part of Katakana UCS Block )r2ZxmlUCSIsKatakana)rr*rrr uCSIsKatakana s r3cCstj|}|S)zSCheck whether the character is part of KatakanaPhoneticExtensions UCS Block )r2Z"xmlUCSIsKatakanaPhoneticExtensions)rr*rrruCSIsKatakanaPhoneticExtensions s r4cCstj|}|S)z7Check whether the character is part of Khmer UCS Block )r2Z xmlUCSIsKhmer)rr*rrr uCSIsKhmer s r5cCstj|}|S)zECheck whether the character is part of KhmerSymbols UCS Block )r2ZxmlUCSIsKhmerSymbols)rr*rrruCSIsKhmerSymbols s r6cCstj|}|S)z5Check whether the character is part of Lao UCS Block )r2Z xmlUCSIsLao)rr*rrruCSIsLao s r7cCstj|}|S)zJCheck whether the character is part of Latin-1Supplement UCS Block )r2ZxmlUCSIsLatin1Supplement)rr*rrruCSIsLatin1Supplement s r8cCstj|}|S)zHCheck whether the character is part of LatinExtended-A UCS Block )r2ZxmlUCSIsLatinExtendedA)rr*rrruCSIsLatinExtendedA s r9cCstj|}|S)zPCheck whether the character is part of LatinExtendedAdditional UCS Block )r2ZxmlUCSIsLatinExtendedAdditional)rr*rrruCSIsLatinExtendedAdditional s r:cCstj|}|S)zHCheck whether the character is part of LatinExtended-B UCS Block )r2ZxmlUCSIsLatinExtendedB)rr*rrruCSIsLatinExtendedB s r;cCstj|}|S)zJCheck whether the character is part of LetterlikeSymbols UCS Block )r2ZxmlUCSIsLetterlikeSymbols)rr*rrruCSIsLetterlikeSymbols s r<cCstj|}|S)z7Check whether the character is part of Limbu UCS Block )r2Z xmlUCSIsLimbu)rr*rrr uCSIsLimbu s r=cCstj|}|S)zICheck whether the character is part of LinearBIdeograms UCS Block )r2ZxmlUCSIsLinearBIdeograms)rr*rrruCSIsLinearBIdeograms s r>cCstj|}|S)zICheck whether the character is part of LinearBSyllabary UCS Block )r2ZxmlUCSIsLinearBSyllabary)rr*rrruCSIsLinearBSyllabary s r?cCstj|}|S)zFCheck whether the character is part of LowSurrogates UCS Block )r2ZxmlUCSIsLowSurrogates)rr*rrruCSIsLowSurrogates s r@cCstj|}|S)z;Check whether the character is part of Malayalam UCS Block )r2ZxmlUCSIsMalayalam)rr*rrruCSIsMalayalam s rAcCstj|}|S)zXCheck whether the character is part of MathematicalAlphanumericSymbols UCS Block )r2Z'xmlUCSIsMathematicalAlphanumericSymbols)rr*rrr$uCSIsMathematicalAlphanumericSymbols s rBcCstj|}|S)zNCheck whether the character is part of MathematicalOperators UCS Block )r2ZxmlUCSIsMathematicalOperators)rr*rrruCSIsMathematicalOperators s rCcCstj|}|S)z[Check whether the character is part of MiscellaneousMathematicalSymbols-A UCS Block )r2Z)xmlUCSIsMiscellaneousMathematicalSymbolsA)rr*rrr&uCSIsMiscellaneousMathematicalSymbolsA s rDcCstj|}|S)z[Check whether the character is part of MiscellaneousMathematicalSymbols-B UCS Block )r2Z)xmlUCSIsMiscellaneousMathematicalSymbolsB)rr*rrr&uCSIsMiscellaneousMathematicalSymbolsB s rEcCstj|}|S)zMCheck whether the character is part of MiscellaneousSymbols UCS Block )r2ZxmlUCSIsMiscellaneousSymbols)rr*rrruCSIsMiscellaneousSymbols s rFcCstj|}|S)zVCheck whether the character is part of MiscellaneousSymbolsandArrows UCS Block )r2Z%xmlUCSIsMiscellaneousSymbolsandArrows)rr*rrr"uCSIsMiscellaneousSymbolsandArrows s rGcCstj|}|S)zOCheck whether the character is part of MiscellaneousTechnical UCS Block )r2ZxmlUCSIsMiscellaneousTechnical)rr*rrruCSIsMiscellaneousTechnical s rHcCstj|}|S)z;Check whether the character is part of Mongolian UCS Block )r2ZxmlUCSIsMongolian)rr*rrruCSIsMongolian s rIcCstj|}|S)zGCheck whether the character is part of MusicalSymbols UCS Block )r2ZxmlUCSIsMusicalSymbols)rr*rrruCSIsMusicalSymbols s rJcCstj|}|S)z9Check whether the character is part of Myanmar UCS Block )r2ZxmlUCSIsMyanmar)rr*rrr uCSIsMyanmar s rKcCstj|}|S)z=Check whether the character is part of NumberForms UCS Block )r2ZxmlUCSIsNumberForms)rr*rrruCSIsNumberForms s rLcCstj|}|S)z7Check whether the character is part of Ogham UCS Block )r2Z xmlUCSIsOgham)rr*rrr uCSIsOgham s rMcCstj|}|S)z;Check whether the character is part of OldItalic UCS Block )r2ZxmlUCSIsOldItalic)rr*rrruCSIsOldItalic s rNcCstj|}|S)zTCheck whether the character is part of OpticalCharacterRecognition UCS Block )r2Z#xmlUCSIsOpticalCharacterRecognition)rr*rrr uCSIsOpticalCharacterRecognition s rOcCstj|}|S)z7Check whether the character is part of Oriya UCS Block )r2Z xmlUCSIsOriya)rr*rrr uCSIsOriya$ s rPcCstj|}|S)z9Check whether the character is part of Osmanya UCS Block )r2ZxmlUCSIsOsmanya)rr*rrr uCSIsOsmanya) s rQcCstj|}|S)zKCheck whether the character is part of PhoneticExtensions UCS Block )r2ZxmlUCSIsPhoneticExtensions)rr*rrruCSIsPhoneticExtensions. s rRcCstj|}|S)zeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zdd?Z!d@dAZ"dBdCZ#dDdEZ$dFdGZ%dHdIZ&dJdKZ'dLdMZ(dNdOZ)dPdQZ*dRdSZ+dTdUZ,dVdWZ-dXdYZ.dZd[Z/d\d]Z0d^d_Z1d`daZ2dbdcZ3dddeZ4dfdgZ5dhdiZ6djdkZ7dldmZ8dndoZ9dpdqZ:drdsZ;dtduZdzd{Z?d|d}Z@d~dZAddZBddZCddZDddZEddZFddZGddZHddZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUddZVddZWddZXddZYddZZddZ[ddZ\ddZ]ddZ^ddZ_ddZ`ddZaddZbddÄZcddńZdddDŽZeddɄZfdd˄Zgdd̈́ZhdS)rNcCs,t|dkrtd||_tj||ddS)Nrz'xmlNode got a wrong wrapper object type)r )r TypeErrorrrXr)rr rrrr s zxmlNode.__init__cCsd|jtt|fS)Nz)rCintr)rrrr__repr__ szxmlNode.__repr__cCs&tj|j}|dkrdSt|d}|S)zGet the namespace of a node N)r )r2Z xmlNodeGetNsrr)rr* _xmlNode__tmprrrns s   z xmlNode.nscCs&tj|j}|dkrdSt|d}|S)zGet the namespace of a node N)r )r2ZxmlNodeGetNsDefsrr)rr*rxrrrnsDefs s   zxmlNode.nsDefscCstj||j|dS)zIDumps debug information for the element node, it is recursive N)r2ZxmlDebugDumpNoder)rrdepthrrr debugDumpNode szxmlNode.debugDumpNodecCstj||j|dS)zQDumps debug information for the list of element node, it is recursive N)r2ZxmlDebugDumpNodeListr)rrr{rrrdebugDumpNodeList szxmlNode.debugDumpNodeListcCstj||j|dS)zMDumps debug information for the element node, it is not recursive N)r2ZxmlDebugDumpOneNoder)rrr{rrrdebugDumpOneNode szxmlNode.debugDumpOneNodecCstj|j}|S)zCount the children of @node. )r2ZxmlLsCountNoder)rr*rrr lsCountNode! s zxmlNode.lsCountNodecCstj||jdS)z,Dump to @output the type and name of @node. N)r2Z xmlLsOneNoder)rrrrr lsOneNode& szxmlNode.lsOneNodecCstj|jdS)zPrint node to the output FILE N)r2ZxmlShellPrintNoder)rrrrshellPrintNode* szxmlNode.shellPrintNodecCs@|dkrd}n|j}tj|j|}|dkr2tdt|d}|S)aAdd a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed) If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. All tree manipulation functions can safely move nodes within a document. But when moving nodes from one document to another, references to namespaces in element or attribute nodes are NOT fixed. In this case, you MUST call xmlReconciliateNs after the move operation to avoid memory errors. NzxmlAddChild() failed)r )rr2Z xmlAddChildrr)rrcur__or*rxrrraddChild2 s  zxmlNode.addChildcCs@|dkrd}n|j}tj|j|}|dkr2tdt|d}|S)zAdd a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed) See the note regarding namespaces in xmlAddChild. NzxmlAddChildList() failed)r )rr2ZxmlAddChildListrr)rrrr*rxrrr addChildListE s zxmlNode.addChildListcCstj|j|dS)zAppend the extra substring to the node content. NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported. N)r2ZxmlNodeAddContentr)rrHrrr addContentP szxmlNode.addContentcCstj|j||dS)zAppend the extra substring to the node content. NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported. N)r2ZxmlNodeAddContentLenr)rrHr)rrr addContentLenW szxmlNode.addContentLencCs@|dkrd}n|j}tj|j|}|dkr2tdt|d}|S)aAdd a new node @elem as the next sibling of @cur If the new node was already inserted in a document it is first unlinked from its existing context. As a result of text merging @elem may be freed. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. See the note regarding namespaces in xmlAddChild. NzxmlAddNextSibling() failed)r )rr2ZxmlAddNextSiblingrr)rrPelem__or*rxrrraddNextSibling^ s zxmlNode.addNextSiblingcCs@|dkrd}n|j}tj|j|}|dkr2tdt|d}|S)aAdd a new node @elem as the previous sibling of @cur merging adjacent TEXT nodes (@elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed. See the note regarding namespaces in xmlAddChild. NzxmlAddPrevSibling() failed)r )rr2ZxmlAddPrevSiblingrr)rrPrr*rxrrraddPrevSiblingm s  zxmlNode.addPrevSiblingcCs@|dkrd}n|j}tj|j|}|dkr2tdt|d}|S)a+Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context. See the note regarding namespaces in xmlAddChild. NzxmlAddSibling() failed)r )rr2Z xmlAddSiblingrr)rrPrr*rxrrr addSibling} s zxmlNode.addSiblingcCs,tj|j|}|dkrtdt|d}|S)zDo a copy of the node. NzxmlCopyNode() failed)r )r2Z xmlCopyNoderrr)rextendedr*rxrrrcopyNode s  zxmlNode.copyNodecCs*tj|j}|dkrtdt|d}|S)zqDo a recursive copy of the node list. Use xmlDocCopyNodeList() if possible to ensure string interning. NzxmlCopyNodeList() failed)r )r2ZxmlCopyNodeListrrr)rr*rxrrr copyNodeList s   zxmlNode.copyNodeListcCs@|dkrd}n|j}tj|j|}|dkr2tdt|d}|S)zDo a copy of the attribute. NzxmlCopyProp() failed)r )rr2 xmlCopyProprri)rrrr*rxrrrcopyProp s zxmlNode.copyPropcCs@|dkrd}n|j}tj|j|}|dkr2tdt|d}|S)z Do a copy of an attribute list. NzxmlCopyPropList() failed)r )rr2xmlCopyPropListrri)rrrr*rxrrr copyPropList s zxmlNode.copyPropListcCsB|dkrd}n|j}tj|j||}|dkr4tdt|d}|S)z+Do a copy of the node to a given document. NzxmlDocCopyNode() failed)r )rr2xmlDocCopyNoderr)rrsrdoc__or*rxrrr docCopyNode s zxmlNode.docCopyNodecCs@|dkrd}n|j}tj||j}|dkr2tdt|d}|S)z&Do a recursive copy of the node list. NzxmlDocCopyNodeList() failed)r )rr2xmlDocCopyNodeListrr)rrsrr*rxrrrdocCopyNodeList s zxmlNode.docCopyNodeListcCs<|dkrd}n|j}tj||j}|dkr.dSt|d}|S)zvSet the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...). N)r )rr2xmlDocSetRootElementr)rrsrr*rxrrrdocSetRootElement s zxmlNode.docSetRootElementcCs&tj|j}|dkrdSt|d}|S)aFinds the first child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references. N)r )r2ZxmlFirstElementChildrr)rr*rxrrrfirstElementChild s   zxmlNode.firstElementChildcCstj|jdS)zFree a node, this is a recursive behaviour, all the children are freed too. This doesn't unlink the child from the list, use xmlUnlinkNode() first. N)r2Z xmlFreeNoder)rrrrfreeNode szxmlNode.freeNodecCstj|jdS)zlFree a node and all its siblings, this is a recursive behaviour, all the children are freed too. N)r2ZxmlFreeNodeListr)rrrr freeNodeList szxmlNode.freeNodeListcCs&|dkrd}n|j}tj||j}|S)aSearches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different. It returns the base as defined in RFC 2396 sections 5.1.1. Base URI within Document Content and 5.1.2. Base URI from the Encapsulating Entity However it does not return the document base (5.1.3), use doc->URL in this case N)rr2xmlNodeGetBase)rrsrr*rrrgetBase s zxmlNode.getBasecCstj|j}|S)aRead the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. )r2rmr)rr*rrrr s zxmlNode.getContentcCstj|j}|S)zSearches the language of a node, i.e. the values of the xml:lang attribute or the one carried by the nearest ancestor. )r2ZxmlNodeGetLangr)rr*rrrgetLang s zxmlNode.getLangcCstj|j}|S)zSearches the space preserving behaviour of a node, i.e. the values of the xml:space attribute or the one carried by the nearest ancestor. )r2ZxmlNodeGetSpacePreserver)rr*rrrgetSpacePreserve s zxmlNode.getSpacePreservecCs*tj|j||}|dkrdSt|d}|S)aSearch for an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. Note that a namespace of None indicates to use the default namespace. N)r )r2Z xmlHasNsProprri)rrC nameSpacer*rxrrr hasNsProp s  zxmlNode.hasNsPropcCs(tj|j|}|dkrdSt|d}|S)zSearch an attribute associated to a node This function also looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. N)r )r2Z xmlHasProprri)rrCr*rxrrrhasProp s  zxmlNode.hasPropcCstj|j}|S)zgChecks whether this node is an empty or whitespace only (and possibly ignorable) text-node. )r2ZxmlIsBlankNoder)rr*rrr isBlankNode s zxmlNode.isBlankNodecCstj|j}|S)zIs this node a Text node ? )r2Z xmlNodeIsTextr)rr*rrrisText s zxmlNode.isTextcCs*tj|j}|dkrtdt|d}|S)z!Search the last child of a node. NzxmlGetLastChild() failed)r )r2ZxmlGetLastChildrrr)rr*rxrrr lastChild s   zxmlNode.lastChildcCs&tj|j}|dkrdSt|d}|S)aFinds the last child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references. N)r )r2ZxmlLastElementChildrr)rr*rxrrrlastElementChild& s   zxmlNode.lastElementChildcCstj|j}|S)zGet line number of @node. Try to override the limitation of lines being store in 16 bits ints if XML_PARSE_BIG_LINES parser option was used )r2Z xmlGetLineNor)rr*rrrlineNo1 s zxmlNode.lineNocCs(|dkrd}n|j}tj||j|}|S)zBuilds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling. N)rr2xmlNodeListGetRawString)rrsinLinerr*rrrlistGetRawString8 s zxmlNode.listGetRawStringcCs(|dkrd}n|j}tj||j|}|S)zlBuild the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs N)rr2xmlNodeListGetString)rrsrrr*rrr listGetStringB s zxmlNode.listGetStringcCsD|dkrd}n|j}tj|j|||}|dkr6tdt|d}|S)aQCreation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (None). If @ns is None, the newly created element inherits the namespace of @parent. If @content is non None, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references. XML special chars must be escaped first by using xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used. NzxmlNewChild() failed)r )rr2 xmlNewChildrr)rryrCrHns__or*rxrrrnewChildJ s  zxmlNode.newChildcCs.tj|j||}|dkr tdt|d}|S)aWCreation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node. Note that for a default namespace, @prefix should be None. We use href==None in the case of an element creation where the namespace was not defined. NzxmlNewNs() failed)r )r2ZxmlNewNsrrr)rrryr*rxrrrnewNs\ s  z xmlNode.newNscCsD|dkrd}n|j}tj|j|||}|dkr6tdt|d}|S)zPCreate a new property tagged with a namespace and carried by a node. NzxmlNewNsProp() failed)r )rr2 xmlNewNsProprri)rryrCrrr*rxrrr newNsProph s zxmlNode.newNsPropcCsD|dkrd}n|j}tj|j|||}|dkr6tdt|d}|S)zPCreate a new property tagged with a namespace and carried by a node. NzxmlNewNsPropEatName() failed)r )rr2xmlNewNsPropEatNamerri)rryrCrrr*rxrrrnewNsPropEatNamer s zxmlNode.newNsPropEatNamecCs.tj|j||}|dkr tdt|d}|S)z)Create a new property carried by a node. NzxmlNewProp() failed)r )r2Z xmlNewProprrri)rrCrr*rxrrrnewProp| s  zxmlNode.newPropcCsD|dkrd}n|j}tj|j|||}|dkr6tdt|d}|S)aCreation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (None). If @ns is None, the newly created element inherits the namespace of @parent. If @content is non None, a child TEXT node will be created containing the string @content. NOTE: Use xmlNewChild() if @content will contain entities that need to be preserved. Use this function, xmlNewTextChild(), if you need to ensure that reserved XML chars that might appear in @content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations. NzxmlNewTextChild() failed)r )rr2xmlNewTextChildrr)rryrCrHrr*rxrrr newTextChild s  zxmlNode.newTextChildcCs&tj|j}|dkrdSt|d}|S)a&Finds the first closest next sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references. N)r )r2ZxmlNextElementSiblingrr)rr*rxrrrnextElementSibling s   zxmlNode.nextElementSiblingcCstj|j|}|S)arSearch and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. This function is similar to xmlGetProp except it will accept only an attribute in no namespace. )r2ZxmlGetNoNsPropr)rrCr*rrrnoNsProp szxmlNode.noNsPropcCstj|j}|S)z0Build a structure based Path for the given node )r2ZxmlGetNodePathr)rr*rrrnodePath s zxmlNode.nodePathcCstj|j||}|S)aFSearch and get the value of an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. )r2Z xmlGetNsPropr)rrCrr*rrrnsProp szxmlNode.nsPropcCs&tj|j}|dkrdSt|d}|S)a*Finds the first closest previous sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references. N)r )r2ZxmlPreviousElementSiblingrr)rr*rxrrrpreviousElementSibling s   zxmlNode.previousElementSiblingcCstj|j|}|S)aSearch and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. NOTE: this function acts independently of namespaces associated to the attribute. Use xmlGetNsProp() or xmlGetNoNsProp() for namespace aware processing. )r2Z xmlGetPropr)rrCr*rrrprop sz xmlNode.propcCs&|dkrd}n|j}tj||j}|S)a!This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree. N)rr2xmlReconciliateNs)rrsrr*rrrreconciliateNs s zxmlNode.reconciliateNscCs@|dkrd}n|j}tj|j|}|dkr2tdt|d}|S)aUnlink the old node from its current context, prune the new one at the same place. If @cur was already inserted in a document it is first unlinked from its existing context. See the note regarding namespaces in xmlAddChild. NzxmlReplaceNode() failed)r )rr2ZxmlReplaceNoderr)rrrr*rxrrr replaceNode s zxmlNode.replaceNodecCsB|dkrd}n|j}tj||j|}|dkr4tdt|d}|S)aSearch a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return None otherwise. @nameSpace can be None, this is a search for the default namespace. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case. NzxmlSearchNs() failed)r )rr2 xmlSearchNsrr)rrsrrr*rxrrrsearchNs s zxmlNode.searchNscCsB|dkrd}n|j}tj||j|}|dkr4tdt|d}|S)zSearch a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return None otherwise. NzxmlSearchNsByHref() failed)r )rr2xmlSearchNsByHrefrr)rrsrrr*rxrrrsearchNsByHref s zxmlNode.searchNsByHrefcCstj|j|dS)z\Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute. N)r2ZxmlNodeSetBaser)rrrrrsetBaseszxmlNode.setBasecCstj|j|dS)a Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). N)r2ZxmlNodeSetContentr)rrHrrr setContent szxmlNode.setContentcCstj|j||dS)a Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). N)r2ZxmlNodeSetContentLenr)rrHr)rrr setContentLenszxmlNode.setContentLencCstj|j|dS)zRSet the language of a node, i.e. the values of the xml:lang attribute. N)r2ZxmlNodeSetLangr)rrSrrrsetLangszxmlNode.setLangcCs&|dkrd}n|j}tj|j|dS)z|dkrd}n|j}tj|j|||}|dkr6tdt|S)z-Create a new xmlXPathObjectPtr of type range NzxmlXPtrNewRange() failed)rr2ZxmlXPtrNewRangerr)rZ startindexr Zendindexrr*rrrxpointerNewRangeszxmlNode.xpointerNewRangecCs:|dkrd}n|j}tj|j|}|dkr2tdt|S)z;Create a new xmlXPathObjectPtr of type range using 2 nodes NzxmlXPtrNewRangeNodes() failed)rr2ZxmlXPtrNewRangeNodesrr)rr rr*rrrxpointerNewRangeNodesszxmlNode.xpointerNewRangeNodes)N)irrrrrwryrzr|r}r~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrr s                                         rc@sfeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zdd?Z!d@dAZ"dBdCZ#dDdEZ$dFdGZ%dHdIZ&dJdKZ'dLdMZ(dNdOZ)dPdQZ*dRdSZ+dTdUZ,dVdWZ-dXdYZ.dZd[Z/d\d]Z0d^d_Z1d`daZ2dbdcZ3dddeZ4dfdgZ5dhdiZ6djdkZ7dldmZ8dndoZ9dpdqZ:drdsZ;dtduZdzd{Z?d|d}Z@d~dZAddZBddZCddZDddZEddZFddZGddZHddZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUddZVddZWddZXddZYddZZddZ[ddZ\ddZ]ddZ^ddZ_ddZ`ddZaddZbddÄZcddńZdddDŽZeddɄZfdd˄Zgdd̈́ZhddτZiddфZjddӄZkddՄZlddׄZmdS)rtNcCs,t|dkrtd||_tj||ddS)Nrz&xmlDoc got a wrong wrapper object type)r )rrurrr)rr rrrrs zxmlDoc.__init__cCsd|jtt|fS)Nz)rCrvr)rrrrrwszxmlDoc.__repr__cCstj|j||}|S)zThe HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if the element or one of it's children would autoclose the given tag. )r2htmlAutoCloseTagr)rrCrPr*rrrrszxmlDoc.htmlAutoCloseTagcCstj|j|}|S)zThe HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if a tag is autoclosed by one of it's child )r2htmlIsAutoClosedr)rrPr*rrrrszxmlDoc.htmlIsAutoClosedcCs*|dkrd}n|j}tj||j||dS)zDump an HTML document. N)rr2htmlDocContentDumpFormatOutput)rbufrzr{buf__orrrrsz%xmlDoc.htmlDocContentDumpFormatOutputcCs(|dkrd}n|j}tj||j|dS)z;Dump an HTML document. Formatting return/spaces are added. N)rr2htmlDocContentDumpOutput)rrrzrrrrrszxmlDoc.htmlDocContentDumpOutputcCstj||j}|S)z'Dump an HTML document to an open FILE. )r2 htmlDocDumpr)rrr*rrrrszxmlDoc.htmlDocDumpcCstj|j}|S)z,Encoding definition lookup in the Meta tags )r2htmlGetMetaEncodingr)rr*rrrrs zxmlDoc.htmlGetMetaEncodingcCs(|dkrd}n|j}tj||j|dS)znDump an HTML node, recursive behaviour,children are printed too, and formatting returns are added. N)rr2htmlNodeDumpFile)rrrrrrrrszxmlDoc.htmlNodeDumpFilecCs,|dkrd}n|j}tj||j|||}|S)zDump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == None try to save in the doc encoding N)rr2htmlNodeDumpFileFormat)rrrrzr{rr*rrrrs zxmlDoc.htmlNodeDumpFileFormatcCs@|dkrd}n|j}|dkr"d}n|j}tj||j|||dS)zLDump an HTML node, recursive behaviour,children are printed too. N)rr2htmlNodeDumpFormatOutput)rrrrzr{rrrrrrszxmlDoc.htmlNodeDumpFormatOutputcCs>|dkrd}n|j}|dkr"d}n|j}tj||j||dS)zuDump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added. N)rr2htmlNodeDumpOutput)rrrrzrrrrrrszxmlDoc.htmlNodeDumpOutputcCstj||j}|S)zYDump an HTML document to a file. If @filename is "-" the stdout file is used. )r2 htmlSaveFiler)rrr*rrrr szxmlDoc.htmlSaveFilecCstj||j|}|S)zkDump an HTML document to a file using a given encoding and formatting returns/spaces are added. )r2htmlSaveFileEncr)rrrzr*rrrrszxmlDoc.htmlSaveFileEnccCstj||j||}|S)z8Dump an HTML document to a file using a given encoding. )r2htmlSaveFileFormatr)rrrzr{r*rrrr szxmlDoc.htmlSaveFileFormatcCstj|j|}|S)zSets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated. )r2htmlSetMetaEncodingr)rrzr*rrrr!szxmlDoc.htmlSetMetaEncodingcCstj||j}|S)z_Check the document for potential content problems, and output the errors to @output )r2ZxmlDebugCheckDocumentr)rrr*rrrdebugCheckDocument(szxmlDoc.debugCheckDocumentcCstj||jdS)z9Dumps debug information for the document, it's recursive N)r2ZxmlDebugDumpDocumentr)rrrrrdebugDumpDocument.szxmlDoc.debugDumpDocumentcCstj||jdS)zJDumps debug information concerning the document, not recursive N)r2ZxmlDebugDumpDocumentHeadr)rrrrrdebugDumpDocumentHead2szxmlDoc.debugDumpDocumentHeadcCstj||jdS)zODumps debug information for all the entities in use by the document N)r2ZxmlDebugDumpEntitiesr)rrrrrdebugDumpEntities7szxmlDoc.debugDumpEntitiescCs4tj|j|||||}|dkr&tdt|d}|S)z)Register a new entity for this document. NzxmlAddDocEntity() failed)r )r2ZxmlAddDocEntityrrr)rrCr rr;rHr* _xmlDoc__tmprrr addDocEntity@s  zxmlDoc.addDocEntitycCs4tj|j|||||}|dkr&tdt|d}|S)z=Register a new entity for this document DTD external subset. NzxmlAddDtdEntity() failed)r )r2ZxmlAddDtdEntityrrr)rrCr rr;rHr*r&rrr addDtdEntityGs  zxmlDoc.addDtdEntitycCs,tj|j|}|dkrtdt|d}|S)z:Do an entity lookup in the document entity hash table and NzxmlGetDocEntity() failed)r )r2ZxmlGetDocEntityrrr)rrCr*r&rrr docEntityNs  zxmlDoc.docEntitycCs,tj|j|}|dkrtdt|d}|S)z5Do an entity lookup in the DTD entity hash table and NzxmlGetDtdEntity() failed)r )r2ZxmlGetDtdEntityrrr)rrCr*r&rrr dtdEntityUs  zxmlDoc.dtdEntitycCstj|j|}|S)zTODO: remove xmlEncodeEntities, once we are not afraid of breaking binary compatibility People must migrate their code to xmlEncodeEntitiesReentrant ! This routine will issue a warning when encountered. )r2ZxmlEncodeEntitiesr)rrr*rrrencodeEntities\szxmlDoc.encodeEntitiescCstj|j|}|S)aDo a global encoding of a string, replacing the predefined entities and non ASCII values with their entities and CharRef counterparts. Contrary to xmlEncodeEntities, this routine is reentrant, and result must be deallocated. )r2ZxmlEncodeEntitiesReentrantr)rrr*rrrencodeEntitiesReentrantdszxmlDoc.encodeEntitiesReentrantcCstj|j|}|S)zDo a global encoding of a string, replacing the predefined entities this routine is reentrant, and result must be deallocated. )r2ZxmlEncodeSpecialCharsr)rrr*rrrencodeSpecialCharslszxmlDoc.encodeSpecialCharscCs4tj|j|||||}|dkr&tdt|d}|S)aQCreate a new entity, this differs from xmlAddDocEntity() that if the document is None or has no internal subset defined, then an unlinked entity structure will be returned, it is then the responsibility of the caller to link it to the document later or free it when not needed anymore. NzxmlNewEntity() failed)r )r2Z xmlNewEntityrrr)rrCr rr;rHr*r&rrr newEntityss  zxmlDoc.newEntitycCs,tj|j|}|dkrtdt|d}|S)z=Do an entity lookup in the internal and external subsets and NzxmlGetParameterEntity() failed)r )r2ZxmlGetParameterEntityrrr)rrCr*r&rrrparameterEntitys  zxmlDoc.parameterEntitycCs*tj|j}|dkrtdt|d}|S)zCreate an XML RelaxNGs parser context for that document. Note: since the process of compiling a RelaxNG schemas modifies the document, the @doc parameter is duplicated internally. Nz#xmlRelaxNGNewDocParserCtxt() failed)r )r2ZxmlRelaxNGNewDocParserCtxtrrrv)rr*r&rrrrelaxNGNewDocParserCtxts   zxmlDoc.relaxNGNewDocParserCtxtcCs&|dkrd}n|j}tj||j}|S)z$Validate a document tree in memory. N)rr2xmlRelaxNGValidateDoc)rrr`r*rrrrelaxNGValidateDocs zxmlDoc.relaxNGValidateDoccCs<|dkrd}n|j}|dkr"d}n|j}tj||j|}|S)zValidate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded. N)rr2xmlRelaxNGValidateFullElement)rrrPr`rr*rrrrelaxNGValidateFullElementsz!xmlDoc.relaxNGValidateFullElementcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|}|S)z7Pop the element end from the RelaxNG validation stack. N)rr2xmlRelaxNGValidatePopElement)rrrPr`rr*rrrrelaxNGValidatePopElementsz xmlDoc.relaxNGValidatePopElementcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|}|S)z:Push a new element start on the RelaxNG validation stack. N)rr2xmlRelaxNGValidatePushElement)rrrPr`rr*rrrrelaxNGValidatePushElementsz!xmlDoc.relaxNGValidatePushElementcCs,tj|j|}|dkrtdt|d}|S)zDo a copy of the document info. If recursive, the content tree will be copied too as well as DTD, namespaces and entities. NzxmlCopyDoc() failed)r )r2Z xmlCopyDocrrrt)r recursiver*r&rrrcopyDocs  zxmlDoc.copyDoccCsB|dkrd}n|j}tj||j|}|dkr4tdt|d}|S)z+Do a copy of the node to a given document. NzxmlDocCopyNode() failed)r )rr2rrr)rrrnode__or*r&rrrrs zxmlDoc.copyNodecCs@|dkrd}n|j}tj|j|}|dkr2tdt|d}|S)z&Do a recursive copy of the node list. NzxmlDocCopyNodeList() failed)r )rr2rrr)rrr;r*r&rrrrs zxmlDoc.copyNodeListcCs0tj|j|||}|dkr"tdt|d}|S)z)Create the internal subset of a document NzxmlCreateIntSubset() failed)r )r2ZxmlCreateIntSubsetrrr)rrCrr;r*r&rrrcreateIntSubsets  zxmlDoc.createIntSubsetcCstj|j}|S)z5get the compression ratio for a document, ZLIB based )r2ZxmlGetDocCompressModer)rr*rrrdocCompressModes zxmlDoc.docCompressModecCstj||j}|S)z&Dump an XML document to an open FILE. )r2Z xmlDocDumpr)rrr*rrrdumpsz xmlDoc.dumpcCs(|dkrd}n|j}tj||j|dS)zQDump an XML/HTML node, recursive behaviour, children are printed too. N)rr2Z xmlElemDump)rrrrrrrelemDumpszxmlDoc.elemDumpcCstj||j|}|S)z&Dump an XML document to an open FILE. )r2ZxmlDocFormatDumpr)rrr{r*rrr formatDumpszxmlDoc.formatDumpcCstj|jdS)zIFree up all the structures used by a document, tree included. N)r2rr)rrrrfreeDocszxmlDoc.freeDoccCs*tj|j}|dkrtdt|d}|S)zvGet the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...). NzxmlDocGetRootElement() failed)r )r2ZxmlDocGetRootElementrrr)rr*r&rrrgetRootElements   zxmlDoc.getRootElementcCs*tj|j}|dkrtdt|d}|S)z&Get the internal subset of a document NzxmlGetIntSubset() failed)r )r2ZxmlGetIntSubsetrrr)rr*r&rrr intSubsets   zxmlDoc.intSubsetcCs.tj|j||}|dkr tdt|d}|S)z1Creation of a new node containing a CDATA block. NzxmlNewCDataBlock() failed)r )r2ZxmlNewCDataBlockrrr)rrHr)r*r&rrr newCDataBlocks  zxmlDoc.newCDataBlockcCs,tj|j|}|dkrtdt|d}|S)z,Creation of a new character reference node. NzxmlNewCharRef() failed)r )r2Z xmlNewCharRefrrr)rrCr*r&rrr newCharRefs  zxmlDoc.newCharRefcCs,tj|j|}|dkrtdt|d}|S)zJCreation of a new node containing a comment within a document. NzxmlNewDocComment() failed)r )r2ZxmlNewDocCommentrrr)rrHr*r&rrr newDocComments  zxmlDoc.newDocCommentcCs*tj|j}|dkrtdt|d}|S)z!Creation of a new Fragment node. NzxmlNewDocFragment() failed)r )r2ZxmlNewDocFragmentrrr)rr*r&rrrnewDocFragments   zxmlDoc.newDocFragmentcCsD|dkrd}n|j}tj|j|||}|dkr6tdt|d}|S)atCreation of a new node element within a document. @ns and @content are optional (None). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support. NzxmlNewDocNode() failed)r )rr2 xmlNewDocNoderr)rryrCrHrr*r&rrr newDocNode%s zxmlDoc.newDocNodecCsD|dkrd}n|j}tj|j|||}|dkr6tdt|d}|S)atCreation of a new node element within a document. @ns and @content are optional (None). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support. NzxmlNewDocNodeEatName() failed)r )rr2xmlNewDocNodeEatNamerr)rryrCrHrr*r&rrrnewDocNodeEatName3s zxmlDoc.newDocNodeEatNamecCs.tj|j||}|dkr tdt|d}|S)z.Creation of a processing instruction element. NzxmlNewDocPI() failed)r )r2Z xmlNewDocPIrrr)rrCrHr*r&rrrnewDocPIAs  zxmlDoc.newDocPIcCs.tj|j||}|dkr tdt|d}|S)a6Create a new property carried by a document. NOTE: @value is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewProp() if you don't need entities support. NzxmlNewDocProp() failed)r )r2Z xmlNewDocProprrri)rrCrr*r&rrr newDocPropHs  zxmlDoc.newDocPropcCsD|dkrd}n|j}tj|j|||}|dkr6tdt|d}|S)zcCreation of a new node element within a document. @ns and @content are optional (None). NzxmlNewDocRawNode() failed)r )rr2xmlNewDocRawNoderr)rryrCrHrr*r&rrr newDocRawNodeSs zxmlDoc.newDocRawNodecCs,tj|j|}|dkrtdt|d}|S)z/Creation of a new text node within a document. NzxmlNewDocText() failed)r )r2Z xmlNewDocTextrrr)rrHr*r&rrr newDocText]s  zxmlDoc.newDocTextcCs.tj|j||}|dkr tdt|d}|S)zzCreation of a new text node with an extra content length parameter. The text node pertain to a given document. NzxmlNewDocTextLen() failed)r )r2ZxmlNewDocTextLenrrr)rrHr)r*r&rrr newDocTextLends  zxmlDoc.newDocTextLencCs0tj|j|||}|dkr"tdt|d}|S)zrCreation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset(). NzxmlNewDtd() failed)r )r2Z xmlNewDtdrrr)rrCrr;r*r&rrrnewDtdls  z xmlDoc.newDtdcCs.tj|j||}|dkr tdt|d}|S)z\Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! NzxmlNewGlobalNs() failed)r )r2ZxmlNewGlobalNsrrr)rrryr*r&rrr newGlobalNsts  zxmlDoc.newGlobalNscCs,tj|j|}|dkrtdt|d}|S)z"Creation of a new reference node. NzxmlNewReference() failed)r )r2ZxmlNewReferencerrr)rrCr*r&rrr newReference|s  zxmlDoc.newReferencecCsB|dkrd}n|j}|dkr"d}n|j}tj||j||||dS)zDump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called N)rr2xmlNodeDumpOutput)rrrrr{rzrrrrrnodeDumpOutputszxmlDoc.nodeDumpOutputcCs&|dkrd}n|j}tj|j|}|S)aSearches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different. It returns the base as defined in RFC 2396 sections 5.1.1. Base URI within Document Content and 5.1.2. Base URI from the Encapsulating Entity However it does not return the document base (5.1.3), use doc->URL in this case N)rr2r)rrrr*rrr nodeGetBases zxmlDoc.nodeGetBasecCs(|dkrd}n|j}tj|j||}|S)zBuilds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling. N)rr2r)rrrlist__or*rrrnodeListGetRawStrings zxmlDoc.nodeListGetRawStringcCs(|dkrd}n|j}tj|j||}|S)zlBuild the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs N)rr2r)rrrrXr*rrrnodeListGetStrings zxmlDoc.nodeListGetStringcCs&|dkrd}n|j}tj|j|}|S)a!This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree. N)rr2r)rtreetree__or*rrrrs zxmlDoc.reconciliateNscCstj||j}|S)zDump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. )r2Z xmlSaveFiler)rrr*rrrsaveFileszxmlDoc.saveFilecCstj||j|}|S)z:Dump an XML document, converting it to the given encoding )r2ZxmlSaveFileEncr)rrrzr*rrr saveFileEncszxmlDoc.saveFileEnccCs(|dkrd}n|j}tj||j|}|S)zDump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call. N)rr2 xmlSaveFileTo)rrrzrr*rrr saveFileTos zxmlDoc.saveFileTocCstj||j|}|S)adDump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. If @format is set then the document will be indented on output. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called )r2ZxmlSaveFormatFiler)rrr{r*rrrsaveFormatFileszxmlDoc.saveFormatFilecCstj||j||}|S)z*Dump an XML document to a file or an URL. )r2ZxmlSaveFormatFileEncr)rrrzr{r*rrrsaveFormatFileEncszxmlDoc.saveFormatFileEnccCs*|dkrd}n|j}tj||j||}|S)zDump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call. N)rr2xmlSaveFormatFileTo)rrrzr{rr*rrrsaveFormatFileTos zxmlDoc.saveFormatFileTocCsB|dkrd}n|j}tj|j||}|dkr4tdt|d}|S)aSearch a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return None otherwise. @nameSpace can be None, this is a search for the default namespace. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case. NzxmlSearchNs() failed)r )rr2rrr)rrrr;r*r&rrrrs zxmlDoc.searchNscCsB|dkrd}n|j}tj|j||}|dkr4tdt|d}|S)zSearch a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return None otherwise. NzxmlSearchNsByHref() failed)r )rr2rrr)rrrr;r*r&rrrrs zxmlDoc.searchNsByHrefcCstj|j|dS)zxset the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression) N)r2ZxmlSetDocCompressModer)rrrrrsetDocCompressModeszxmlDoc.setDocCompressModecCs&|dkrd}n|j}tj||jdS)zchildren is a list containing possibly comments, PIs, etc ...). N)r )rr2rr)rrootroot__or*r&rrrsetRootElement s zxmlDoc.setRootElementcCs&|dkrd}n|j}tj||jdS)zJupdate all nodes under the tree to point to the right document N)rr2r)rr[r\rrrrszxmlDoc.setTreeDoccCs,tj|j|}|dkrtdt|d}|S)zParse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs. NzxmlStringGetNodeList() failed)r )r2ZxmlStringGetNodeListrrr)rrr*r&rrrstringGetNodeLists  zxmlDoc.stringGetNodeListcCs.tj|j||}|dkr tdt|d}|S)zParse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs. Nz xmlStringLenGetNodeList() failed)r )r2ZxmlStringLenGetNodeListrrr)rrr)r*r&rrrstringLenGetNodeList&s  zxmlDoc.stringLenGetNodeListcCs,tj|j|}|dkrtdt|d}|S)z,Search the attribute declaring the given ID NzxmlGetID() failed)r )r2ZxmlGetIDrrri)rrWr*r&rrrrW2s  z xmlDoc.IDcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||}|S)zDetermine whether an attribute is of type ID. In case we have DTD(s) then this is done if DTD loading has been requested. In the case of HTML documents parsed with the HTML parser, then ID detection is done systematically. N)rr2r)rrPrxrrr*rrrr9sz xmlDoc.isIDcCstj|j|}|S)zSearch in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs )r2ZxmlIsMixedElementr)rrCr*rrrisMixedElementEszxmlDoc.isMixedElementcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||}|S)aDEPRECATED, do not use. This function will be removed from the public API. Determine whether an attribute is of type Ref. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name Ref (upper or lowercase). N)rr2r)rrPrxrrr*rrrrKsz xmlDoc.isRefcCs&|dkrd}n|j}tj|j|}|S)zORemove the given attribute from the ID table maintained internally. N)rr2 xmlRemoveID)rrxrr*rrrremoveIDWs zxmlDoc.removeIDcCs&|dkrd}n|j}tj|j|}|S)zDEPRECATED, do not use. This function will be removed from the public API. Remove the given attribute from the Ref table maintained internally. N)rr2 xmlRemoveRef)rrxrr*rrr removeRef_s zxmlDoc.removeRefcCs@|dkrd}n|j}|dkr"d}n|j}tj||j|||}|S)aDoes the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character. Also check VC: Standalone Document Declaration in P32, and update ctxt->valid accordingly N)rr2#xmlValidCtxtNormalizeAttributeValue)rrrPrCrr`rr*rrr validCtxtNormalizeAttributeValuehs z'xmlDoc.validCtxtNormalizeAttributeValuecCs*|dkrd}n|j}tj|j|||}|S)aDoes the validation related extra step of the normalization of attribute values: If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by single space (#x20) character. N)rr2r)rrPrCrrr*rrrrxs z#xmlDoc.validNormalizeAttributeValuecCs&|dkrd}n|j}tj||j}|S)zTry to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree. N)rr2xmlValidateDocument)rrr`r*rrrvalidateDocuments zxmlDoc.validateDocumentcCs&|dkrd}n|j}tj||j}|S)aDoes the final step for the document validation once all the incremental validation steps have been completed basically it does the following checks described by the XML Rec Check all the IDREF/IDREFS attributes definition for validity N)rr2xmlValidateDocumentFinal)rrr`r*rrrvalidateDocumentFinals zxmlDoc.validateDocumentFinalcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|}|S)aTry to validate the document against the dtd instance Basically it does check all the definitions in the DtD. Note the the internal subset (if present) is de-coupled (i.e. not used), which could give problems if ID or IDREF is present. N)rr2xmlValidateDtd)rrrr`dtd__or*rrr validateDtdszxmlDoc.validateDtdcCs&|dkrd}n|j}tj||j}|S)aDoes the final step for the dtds validation once all the subsets have been parsed basically it does the following checks described by the XML Rec - check that ENTITY and ENTITIES type attributes default or possible values matches one of the defined entities. - check that NOTATION type attributes default or possible values matches one of the defined notations. N)rr2xmlValidateDtdFinal)rrr`r*rrrvalidateDtdFinals zxmlDoc.validateDtdFinalcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|}|S)z-Try to validate the subtree under an element N)rr2xmlValidateElement)rrrfr`rgr*rrrvalidateElementszxmlDoc.validateElementcCs(|dkrd}n|j}tj||j|}|S)zbValidate that the given name match a notation declaration. - [ VC: Notation Declared ] N)rr2xmlValidateNotationUse)rrrSr`r*rrrvalidateNotationUses zxmlDoc.validateNotationUsec CsT|dkrd}n|j}|dkr"d}n|j}|dkr6d}n|j}tj||j|||}|S)aTry to validate a single attribute for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately N)rr2xmlValidateOneAttribute) rrrPrxrr`rrr*rrrvalidateOneAttributeszxmlDoc.validateOneAttributecCs<|dkrd}n|j}|dkr"d}n|j}tj||j|}|S)a]Try to validate a single element and it's attributes, basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC: Required Attribute ] Then call xmlValidateOneAttribute() for each attribute present. The ID/IDREF checkings are done separately N)rr2xmlValidateOneElement)rrrPr`rr*rrrvalidateOneElementszxmlDoc.validateOneElementc CsV|dkrd}n|j}|dkr"d}n|j}|dkr6d}n|j}tj||j||||} | S)aTry to validate a single namespace declaration for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately N)rr2xmlValidateOneNamespace) rrrPryryrr`rrr*rrrvalidateOneNamespaceszxmlDoc.validateOneNamespacecCs>|dkrd}n|j}|dkr"d}n|j}tj||j||}|S)z/Pop the element end from the validation stack. N)rr2xmlValidatePopElement)rrrPqnamer`rr*rrrvalidatePopElementszxmlDoc.validatePopElementcCs>|dkrd}n|j}|dkr"d}n|j}tj||j||}|S)z2Push a new element start on the validation stack. N)rr2xmlValidatePushElement)rrrPrr`rr*rrrvalidatePushElementszxmlDoc.validatePushElementcCs&|dkrd}n|j}tj||j}|S)zTry to validate a the root element basically it does the following check as described by the XML-1.0 recommendation: - [ VC: Root Element Type ] it doesn't try to recurse or apply other check to the element N)rr2xmlValidateRoot)rrr`r*rrr validateRoots zxmlDoc.validateRootcCstj|j}|S)z=Implement the XInclude substitution on the XML document @doc )r2ZxmlXIncludeProcessr)rr*rrrxincludeProcesss zxmlDoc.xincludeProcesscCstj|j|}|S)z=Implement the XInclude substitution on the XML document @doc )r2ZxmlXIncludeProcessFlagsr)rrr*rrrxincludeProcessFlagsszxmlDoc.xincludeProcessFlagscCs&|dkrd}n|j}tj||j}|S)zuSetup an xmltextReader to parse a preparsed XML document. This reuses the existing @reader xmlTextReader. N)rr2xmlReaderNewWalker)rreader reader__or*rrr NewWalker"s zxmlDoc.NewWalkercCs*tj|j}|dkrtdt|d}|S)z2Create an xmltextReader for a preparsed document. NzxmlReaderWalker() failed)r )r2ZxmlReaderWalkerrrr)rr*r&rrr readerWalker*s   zxmlDoc.readerWalkercCs*tj|j}|dkrtdt|d}|S)zCreate an XML Schemas parse context for that document. NB. The document may be modified during the parsing process. Nz"xmlSchemaNewDocParserCtxt() failed)r )r2ZxmlSchemaNewDocParserCtxtrrr)rr*r&rrrschemaNewDocParserCtxt5s   zxmlDoc.schemaNewDocParserCtxtcCs&|dkrd}n|j}tj||j}|S)z$Validate a document tree in memory. N)rr2xmlSchemaValidateDoc)rrr`r*rrrschemaValidateDoc=s zxmlDoc.schemaValidateDoccCs*tj|j}|dkrtdt|d}|S)zCreate a new xmlXPathContext NzxmlXPathNewContext() failed)r )r2ZxmlXPathNewContextrrr )rr*r&rrrrHs   zxmlDoc.xpathNewContextcCstj|j}|S)amCall this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element->content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers. )r2ZxmlXPathOrderDocElemsr)rr*rrrxpathOrderDocElemsOs zxmlDoc.xpathOrderDocElemscCsV|dkrd}n|j}|dkr"d}n|j}tj|j||}|dkrHtdt|d}|S)zCreate a new XPointer context NzxmlXPtrNewContext() failed)r )rr2rrr )rherer Zhere__or r*r&rrrr ]s zxmlDoc.xpointerNewContext)N)nrrrrrwrrrrrrrrrrrrr r!r"r#r$r%r'r(r)r*r+r,r-r.r/r0r2r4r6r8r:rrr<r=r>r?r@rArBrCrDrErFrGrIrKrLrMrOrPrQrRrSrTrVrWrYrZrr]r^r`rarbrdrrrerrhrrirjrWrrkrrmrorqrrsrurxrzr|r~rrrrrrrrrrrrrrr rrrrrts                                         rtc@sNeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ dS)rNcCs|dkr||_dSd|_dS)N)r)rr rrrriszError.__init__cCstj|j}|S)z'The error code, e.g. an xmlParserError )r2ZxmlErrorGetCoder)rr*rrrrns z Error.codecCstj|j}|S)z+What part of the library raised this error )r2ZxmlErrorGetDomainr)rr*rrrdomainss z Error.domaincCstj|j}|S)z the filename )r2ZxmlErrorGetFiler)rr*rrrr8xs z Error.filecCstj|j}|S)zhow consequent is the error )r2ZxmlErrorGetLevelr)rr*rrrr}s z Error.levelcCstj|j}|S)zthe line number if available )r2ZxmlErrorGetLiner)rr*rrrlines z Error.linecCstj|j}|S)z)human-readable informative error message )r2ZxmlErrorGetMessager)rr*rrrmessages z Error.messagecCstj|jdS)zCleanup the error. N)r2Z xmlResetErrorr)rrrr resetErrorszError.resetError)N) rrrrrrr8rrrrrrrrrhs  rc@seZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zdd?Z!d@dAZ"dBdCZ#dDdEZ$dFdGZ%dHdIZ&dJdKZ'dLdMZ(dNdOZ)dPdQZ*dRdSZ+dTdUZ,dVdWZ-dXdYZ.dZd[Z/d\d]Z0d^d_Z1d`daZ2dbdcZ3dddeZ4dfdgZ5dhdiZ6djdkZ7dldmZ8dndoZ9dpdqZ:drdsZ;dtduZdzd{Z?d|d}Z@d~dZAddZBddZCddZDddZEddZFddZGddZHddZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUdS)rNcCs||_tj||ddS)N)r )rrr)rr rrrrszparserCtxt.__init__cCs |jdkrtj|jd|_dS)N)rr2r)rrrrr5s  zparserCtxt.__del__cCs*tj|j}|dkrtdt|d}|S)z-Get the document tree from a parser context. NzxmlParserGetDoc() failed)r )r2ZxmlParserGetDocrrrt)rr*_parserCtxt__tmprrrrss   zparserCtxt.doccCstj|j}|S)z4Get the validity information from a parser context. )r2ZxmlParserGetIsValidr)rr*rrrisValids zparserCtxt.isValidcCstj|j|dS)zmyDoc is not freed. N)r2htmlFreeParserCtxtr)rrrrrszparserCtxt.htmlFreeParserCtxtcCstj|j}|S)zDEPRECATED: Internal function, don't use. parse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' )r2htmlParseCharRefr)rr*rrrrs zparserCtxt.htmlParseCharRefcCstj|j|||}|S)zParse a Chunk of memory )r2htmlParseChunkr)rrjr terminater*rrrrszparserCtxt.htmlParseChunkcCstj|j}|S)zZparse an HTML document (and build a tree if using the standard SAX interface). )r2htmlParseDocumentr)rr*rrrrs zparserCtxt.htmlParseDocumentcCstj|jdS)aDEPRECATED: Internal function, don't use. parse an HTML element, this is highly recursive this is kept for compatibility with previous code versions [39] element ::= EmptyElemTag | STag content ETag [41] Attribute ::= Name Eq AttValue N)r2htmlParseElementr)rrrrrszparserCtxt.htmlParseElementcCstj|j}|S)aThis function provides the current index of the parser relative to the start of the current entity. This function is computed in bytes from the beginning starting at zero and finishing at the size in byte of the file if parsing a file. The function is of constant cost if the input is UTF-8 but can be costly if run on non-UTF-8 input. )r2ZxmlByteConsumedr)rr*rrr byteConsumeds zparserCtxt.byteConsumedcCstj|jdS)zMClear (release owned resources) and reinitialize a parser context N)r2ZxmlClearParserCtxtr)rrrrclearParserCtxtszparserCtxt.clearParserCtxtcCs2tj|j||||}|dkr$tdt|d}|S)zkparse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context NzxmlCtxtReadDoc() failed)r )r2ZxmlCtxtReadDocrrrt)rr.rrzrr*rrrr ctxtReadDoc#s  zparserCtxt.ctxtReadDoccCs2tj|j||||}|dkr$tdt|d}|S)zparse an XML from a file descriptor and build a tree. This reuses the existing @ctxt parser context NOTE that the file descriptor will not be closed when the reader is closed or reset. NzxmlCtxtReadFd() failed)r )r2Z xmlCtxtReadFdrrrt)rrrrzrr*rrrr ctxtReadFd+s  zparserCtxt.ctxtReadFdcCs0tj|j|||}|dkr"tdt|d}|S)zoparse an XML file from the filesystem or the network. This reuses the existing @ctxt parser context NzxmlCtxtReadFile() failed)r )r2ZxmlCtxtReadFilerrrt)rrrzrr*rrrr ctxtReadFile5s  zparserCtxt.ctxtReadFilecCs4tj|j|||||}|dkr&tdt|d}|S)zkparse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context NzxmlCtxtReadMemory() failed)r )r2ZxmlCtxtReadMemoryrrrt)rrrrrzrr*rrrrctxtReadMemory=s  zparserCtxt.ctxtReadMemorycCstj|jdS)zReset a parser context N)r2Z xmlCtxtResetr)rrrr ctxtResetEszparserCtxt.ctxtResetcCstj|j||||}|S)zReset a push parser context )r2ZxmlCtxtResetPushr)rrjrrrzr*rrr ctxtResetPushIszparserCtxt.ctxtResetPushcCstj|j|}|S)z*Applies the options to the parser context )r2ZxmlCtxtUseOptionsr)rrr*rrrctxtUseOptionsNszparserCtxt.ctxtUseOptionscCstj|j}|S)zvDEPRECATED: Internal function which will be made private in a future version. Initialize a parser context )r2ZxmlInitParserCtxtr)rr*rrrinitParserCtxtSs zparserCtxt.initParserCtxtcCstj|j|||}|S)zParse a Chunk of memory )r2Z xmlParseChunkr)rrjrrr*rrr parseChunkYszparserCtxt.parseChunkcCstj|j}|S)zparse an XML document (and build a tree if using the standard SAX interface). [1] document ::= prolog element Misc* [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? )r2ZxmlParseDocumentr)rr*rrr parseDocument^s zparserCtxt.parseDocumentcCstj|j}|S)zparse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content )r2ZxmlParseExtParsedEntr)rr*rrrparseExtParsedEntes zparserCtxt.parseExtParsedEntcCstj|j||dS)zDEPRECATED: Don't use. Setup the parser context to parse a new buffer; Clears any prior contents from the parser context. The buffer parameter must not be None, but the filename parameter can be N)r2ZxmlSetupParserForBufferr)rrrrrrsetupParserForBufferlszparserCtxt.setupParserForBuffercCstj|jdS)z!Blocks further parser processing N)r2Z xmlStopParserr)rrrr stopParsersszparserCtxt.stopParsercCstj|j|||||}|S)zThis function is deprecated, we now always process entities content through xmlStringDecodeEntities TODO: remove it in next major release. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';' )r2ZxmlDecodeEntitiesr)rr)whatr end2end3r*rrrdecodeEntities{szparserCtxt.decodeEntitiescCs&|dkrd}n|j}tj|j|dS)zDefault handling of defined entities, when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point. N)rr2xmlHandleEntity)rZentityZ entity__orrr handleEntityszparserCtxt.handleEntitycCstj|j}|S)aCparse an XML namespace name. TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 3] NCName ::= (Letter | '_') (NCNameChar)* [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender )r2ZxmlNamespaceParseNCNamer)rr*rrrnamespaceParseNCNames zparserCtxt.namespaceParseNCNamecCstj|j}|S)a!parse a namespace prefix declaration TODO: this seems not in use anymore, the namespace handling is done on top of the SAX interfaces, i.e. not on raw input. [NS 1] NSDef ::= PrefixDef Eq SystemLiteral [NS 2] PrefixDef ::= 'xmlns' (':' NCName)? )r2ZxmlNamespaceParseNSDefr)rr*rrrnamespaceParseNSDefs zparserCtxt.namespaceParseNSDefcCstj|jdS)zYDEPRECATED: Internal function, do not use. Skip to the next char input char. N)r2Z xmlNextCharr)rrrrnextCharszparserCtxt.nextCharcCstj|j}|S)aADEPRECATED: Internal function, don't use. parse a value for an attribute Note: the parser won't do substitution of entities here, this will be handled later in xmlStringGetNodeList [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'" 3.3.3 Attribute-Value Normalization: Before the value of an attribute is passed to the application or checked for validity, the XML processor must normalize it as follows: - a character reference is processed by appending the referenced character to the attribute value - an entity reference is processed by recursively processing the replacement text of the entity - a whitespace character (#x20, #xD, #xA, #x9) is processed by appending #x20 to the normalized value, except that only a single #x20 is appended for a "#xD#xA" sequence that is part of an external parsed entity or the literal entity value of an internal parsed entity - other characters are processed by appending them to the normalized value If the declared value is not CDATA, then the XML processor must further process the normalized attribute value by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character. All attributes for which no declaration has been read should be treated by a non-validating parser as if declared CDATA. )r2ZxmlParseAttValuer)rr*rrr parseAttValues zparserCtxt.parseAttValuecCstj|jdS)zDEPRECATED: Internal function, don't use. Parse an attribute list declaration for an element. Always consumes '' [53] AttDef ::= S Name S AttType S DefaultDecl N)r2ZxmlParseAttributeListDeclr)rrrrparseAttributeListDeclsz!parserCtxt.parseAttributeListDeclcCstj|jdS)aDEPRECATED: Internal function, don't use. Parse escaped pure raw content. Always consumes '' Char*)) [21] CDEnd ::= ']]>' N)r2ZxmlParseCDSectr)rrrr parseCDSectszparserCtxt.parseCDSectcCstj|j|dS)z*DEPRECATED: Internal function, don't use. N)r2ZxmlParseCharDatar)rZcdatarrr parseCharDataszparserCtxt.parseCharDatacCstj|j}|S)a9DEPRECATED: Internal function, don't use. Parse a numeric character reference. Always consumes '&'. [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ] Characters referred to using character references must match the production for Char. )r2ZxmlParseCharRefr)rr*rrr parseCharRefs zparserCtxt.parseCharRefcCstj|jdS)a5DEPRECATED: Internal function, don't use. Parse an XML (SGML) comment. Always consumes '' N)r2ZxmlParseCommentr)rrrr parseCommentszparserCtxt.parseCommentcCstj|jdS)zParse a content sequence. Stops at EOF or '' [ VC: Root Element Type ] The Name in the document type declaration must match the element type of the root element. N)r2ZxmlParseDocTypeDeclr)rrrrparseDocTypeDeclszparserCtxt.parseDocTypeDeclcCstj|jdS)zDEPRECATED: Internal function, don't use. parse an XML element [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag. N)r2ZxmlParseElementr)rrrr parseElementszparserCtxt.parseElementcCstj|j}|S)aDEPRECATED: Internal function, don't use. Parse an element declaration. Always consumes '' [ VC: Unique Element Type Declaration ] No element type may be declared more than once )r2ZxmlParseElementDeclr)rr*rrrparseElementDecls zparserCtxt.parseElementDeclcCstj|j}|S)zDEPRECATED: Internal function, don't use. parse the XML encoding name [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* )r2ZxmlParseEncNamer)rr*rrr parseEncNames zparserCtxt.parseEncNamecCstj|j}|S)zDEPRECATED: Internal function, don't use. parse the XML encoding declaration [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this setups the conversion filters. )r2ZxmlParseEncodingDeclr)rr*rrrparseEncodingDecls zparserCtxt.parseEncodingDeclcCstj|jdS)zDEPRECATED: Internal function, don't use. parse an end of tag [42] ETag ::= '' With namespace [NS 9] ETag ::= '' N)r2ZxmlParseEndTagr)rrrr parseEndTagszparserCtxt.parseEndTagcCstj|jdS)aDEPRECATED: Internal function, don't use. Parse an entity declaration. Always consumes '' [72] PEDecl ::= '' [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) [74] PEDef ::= EntityValue | ExternalID [76] NDataDecl ::= S 'NDATA' S Name [ VC: Notation Declared ] The Name must match the declared name of a notation. N)r2ZxmlParseEntityDeclr)rrrrparseEntityDecls zparserCtxt.parseEntityDeclcCs*tj|j}|dkrtdt|d}|S)aDEPRECATED: Internal function, don't use. Parse an entitiy reference. Always consumes '&'. [68] EntityRef ::= '&' Name ';' [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", the Name given in the entity reference must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. The declaration of a parameter entity must precede any reference to it. Similarly, the declaration of a general entity must precede any reference to it which appears in a default value in an attribute-list declaration. Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'. [ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity NzxmlParseEntityRef() failed)r )r2ZxmlParseEntityRefrrr)rr*rrrrparseEntityRef!s   zparserCtxt.parseEntityRefcCstj|j||dS)zparse Markup declarations from an external subset [30] extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) * N)r2ZxmlParseExternalSubsetr)rrr;rrrparseExternalSubset;szparserCtxt.parseExternalSubsetcCstj|jdS)aDEPRECATED: Internal function, don't use. Parse markup declarations. Always consumes '' Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S SystemLiteral See the NOTE on xmlParseExternalID(). N)r2ZxmlParseNotationDeclr)rrrrparseNotationDeclpszparserCtxt.parseNotationDeclcCstj|jdS)a=DEPRECATED: Internal function, don't use. Parse a parameter entity reference. Always consumes '%'. The entity content is handled directly by pushing it's content as a new input stream. [69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A parsed entity must not contain a recursive reference to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any reference to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any reference to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled. N)r2ZxmlParsePEReferencer)rrrrparsePEReferenceyszparserCtxt.parsePEReferencecCstj|jdS)zDEPRECATED: Internal function, don't use. parse an XML Processing Instruction. [16] PI ::= '' Char*)))? '?>' The processing is transferred to SAX once parsed. N)r2Z xmlParsePIr)rrrrparsePIszparserCtxt.parsePIcCstj|j}|S)zDEPRECATED: Internal function, don't use. parse the name of a PI [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) )r2ZxmlParsePITargetr)rr*rrr parsePITargets zparserCtxt.parsePITargetcCstj|j}|S)zDEPRECATED: Internal function, don't use. parse an XML public literal [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'" )r2ZxmlParsePubidLiteralr)rr*rrrparsePubidLiterals zparserCtxt.parsePubidLiteralcCstj|j}|S)zParse and return a string between quotes or doublequotes TODO: Deprecated, to be removed at next drop of binary compatibility )r2ZxmlParseQuotedStringr)rr*rrrparseQuotedStrings zparserCtxt.parseQuotedStringcCstj|jdS)aDEPRECATED: Internal function, don't use. parse and handle entity references in content, depending on the SAX interface, this may end-up in a call to character() if this is a CharRef, a predefined entity, if there is no reference() callback. or if the parser was asked to switch to that mode. Always consumes '&'. [67] Reference ::= EntityRef | CharRef N)r2ZxmlParseReferencer)rrrrparseReferenceszparserCtxt.parseReferencecCstj|j}|S)aDEPRECATED: Internal function, don't use. parse the XML standalone declaration [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no')'"')) [ VC: Standalone Document Declaration ] TODO The standalone document declaration must have the value "no" if any external markup declarations contain declarations of: - attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or - entities (other than amp, lt, gt, apos, quot), if references to those entities appear in the document, or - attributes with values subject to normalization, where the attribute appears in the document with a value which will change as a result of normalization, or - element types with element content, if white space occurs directly within any instance of those types. )r2ZxmlParseSDDeclr)rr*rrr parseSDDecls zparserCtxt.parseSDDeclcCstj|j}|S)atDEPRECATED: Internal function, don't use. Parse a start tag. Always consumes '<'. [40] STag ::= '<' Name (S Attribute)* S? '>' [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [ WFC: Unique Att Spec ] No attribute name may appear more than once in the same start-tag or empty-element tag. With namespace: [NS 8] STag ::= '<' QName (S Attribute)* S? '>' [NS 10] EmptyElement ::= '<' QName (S Attribute)* S? '/>' )r2ZxmlParseStartTagr)rr*rrr parseStartTags zparserCtxt.parseStartTagcCstj|j}|S)zDEPRECATED: Internal function, don't use. parse an XML Literal [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'") )r2ZxmlParseSystemLiteralr)rr*rrrparseSystemLiterals zparserCtxt.parseSystemLiteralcCstj|jdS)zDEPRECATED: Internal function, don't use. parse an XML declaration header for external entities [77] TextDecl ::= '' N)r2ZxmlParseTextDeclr)rrrr parseTextDeclszparserCtxt.parseTextDeclcCstj|j}|S)zDEPRECATED: Internal function, don't use. parse the XML version. [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S? )r2ZxmlParseVersionInfor)rr*rrrparseVersionInfos zparserCtxt.parseVersionInfocCstj|j}|S)zDEPRECATED: Internal function, don't use. parse the XML version value. [26] VersionNum ::= '1.' [0-9]+ In practice allow [0-9].[0-9]+ at that level )r2ZxmlParseVersionNumr)rr*rrrparseVersionNums zparserCtxt.parseVersionNumcCstj|jdS)zDEPRECATED: Internal function, don't use. parse an XML declaration header [23] XMLDecl ::= '' N)r2ZxmlParseXMLDeclr)rrrr parseXMLDeclszparserCtxt.parseXMLDeclcCstj|jdS)aDEPRECATED: Internal function, do not use. [69] PEReference ::= '%' Name ';' [ WFC: No Recursion ] A parsed entity must not contain a recursive reference to itself, either directly or indirectly. [ WFC: Entity Declared ] In a document without any DTD, a document with only an internal DTD subset which contains no parameter entity references, or a document with "standalone='yes'", ... ... The declaration of a parameter entity must precede any reference to it... [ VC: Entity Declared ] In a document with an external subset or external parameter entities with "standalone='no'", ... ... The declaration of a parameter entity must precede any reference to it... [ WFC: In DTD ] Parameter-entity references may only appear in the DTD. NOTE: misleading but this is handled. A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc i.e. - Included in literal in entity values - Included as Parameter Entity reference within DTDs N)r2ZxmlParserHandlePEReferencer)rrrrparserHandlePEReferencesz"parserCtxt.parserHandlePEReferencecCstj|jdS)a TODO: Remove, now deprecated ... the test is done directly in the content parsing routines. [67] Reference ::= EntityRef | CharRef [68] EntityRef ::= '&' Name ';' [ WFC: Entity Declared ] the Name given in the entity reference must match that in an entity declaration, except that well-formed documents need not declare any of the following entities: amp, lt, gt, apos, quot. [ WFC: Parsed Entity ] An entity reference must not contain the name of an unparsed entity [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' A PEReference may have been detected in the current input stream the handling is done accordingly to http://www.w3.org/TR/REC-xml#entproc N)r2ZxmlParserHandleReferencer)rrrrparserHandleReference s z parserCtxt.parserHandleReferencecCstj|j}|S)zqxmlPopInput: the current input pointed by ctxt->input came to an end pop it and return the next char. )r2Z xmlPopInputr)rr*rrrpopInputs zparserCtxt.popInputcCstj|j}|S)aTrickery: parse an XML name but without consuming the input flow Needed for rollback cases. Used only when parsing entities references. TODO: seems deprecated now, only used in the default part of xmlParserHandleReference [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (S Name)* )r2Z xmlScanNamer)rr*rrrscanName!s zparserCtxt.scanNamecCstj|j}|S)zDEPRECATED: Internal function, do not use. skip all blanks character found at that point in the input streams. It pops up finished entities in the process if allowable at that point. )r2ZxmlSkipBlankCharsr)rr*rrrskipBlankChars,s zparserCtxt.skipBlankCharscCstj|j|||||}|S)zDEPRECATED: Internal function, don't use. Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';' )r2ZxmlStringDecodeEntitiesr)rr.rr rrr*rrrstringDecodeEntities4szparserCtxt.stringDecodeEntitiescCstj|j||||||}|S)zDEPRECATED: Internal function, don't use. Takes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';' )r2ZxmlStringLenDecodeEntitiesr)rr.r)rr rrr*rrrstringLenDecodeEntities<sz"parserCtxt.stringLenDecodeEntities)N)Vrrrrr5rsrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrs               rc@sfeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ dS)riNcCs,t|dkrtd||_tj||ddS)Nrz'xmlAttr got a wrong wrapper object type)r )rrurrr)rr rrrrEs zxmlAttr.__init__cCsd|jtt|fS)Nz)rCrvr)rrrrrwJszxmlAttr.__repr__cCstj||j|dS)z*Dumps debug information for the attribute N)r2ZxmlDebugDumpAttrr)rrr{rrr debugDumpAttrQszxmlAttr.debugDumpAttrcCstj||j|dS)z/Dumps debug information for the attribute list N)r2ZxmlDebugDumpAttrListr)rrr{rrrdebugDumpAttrListUszxmlAttr.debugDumpAttrListcCs@|dkrd}n|j}tj||j}|dkr2tdt|d}|S)zDo a copy of the attribute. NzxmlCopyProp() failed)r )rr2rrri)rrF target__or* _xmlAttr__tmprrrr]s zxmlAttr.copyPropcCs@|dkrd}n|j}tj||j}|dkr2tdt|d}|S)z Do a copy of an attribute list. NzxmlCopyPropList() failed)r )rr2rrri)rrFrr*rrrrrfs zxmlAttr.copyPropListcCstj|jdS)z1Free one attribute, all the content is freed too N)r2Z xmlFreePropr)rrrrfreeProposzxmlAttr.freePropcCstj|jdS)zQFree a property and all its siblings, all the children are freed too. N)r2ZxmlFreePropListr)rrrr freePropListsszxmlAttr.freePropListcCstj|j}|S)zUnlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes )r2Z xmlRemovePropr)rr*rrr removePropxs zxmlAttr.removePropcCs&|dkrd}n|j}tj||j}|S)zORemove the given attribute from the ID table maintained internally. N)rr2rl)rrsrr*rrrrms zxmlAttr.removeIDcCs&|dkrd}n|j}tj||j}|S)zDEPRECATED, do not use. This function will be removed from the public API. Remove the given attribute from the Ref table maintained internally. N)rr2rn)rrsrr*rrrros zxmlAttr.removeRef)N)rrrrrwrrrrrrrrmrorrrrriDs    ric@seZdZdddZddZdS)rNcCs,t|dkrtd||_tj||ddS)Nrz,xmlAttribute got a wrong wrapper object type)r )rrurrr)rr rrrrs zxmlAttribute.__init__cCsd|jtt|fS)Nz")rCrvr)rrrrrwszxmlAttribute.__repr__)N)rrrrrwrrrrrs rc@sfeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ dS)r NcCs|dkr||_dSd|_dS)N)r)rr rrrrszcatalog.__init__cCs |jdkrtj|jd|_dS)N)rr2ZxmlFreeCatalog)rrrrr5s  zcatalog.__del__cCstj|j|||}|S)zYAdd an entry in the catalog, it may overwrite existing but different entries. )r2ZxmlACatalogAddr)rr rrr*rrraddsz catalog.addcCstj|j}|S)zCheck is a catalog is empty )r2ZxmlCatalogIsEmptyr)rr*rrrcatalogIsEmptys zcatalog.catalogIsEmptycCstj|j}|S)z1Convert all the SGML catalog entries as XML ones )r2ZxmlConvertSGMLCatalogr)rr*rrrconvertSGMLCatalogs zcatalog.convertSGMLCatalogcCstj|j|dS)z*Dump the given catalog to the given file. N)r2ZxmlACatalogDumpr)rrrrrr>sz catalog.dumpcCstj|j|}|S)z!Remove an entry from the catalog )r2ZxmlACatalogRemover)rrr*rrrremoveszcatalog.removecCstj|j||}|S)z:Do a complete resolution lookup of an External Identifier )r2ZxmlACatalogResolver)rrrr*rrrresolveszcatalog.resolvecCstj|j|}|S)z_Try to lookup the catalog local reference associated to a public ID in that catalog )r2ZxmlACatalogResolvePublicr)rrr*rrr resolvePublicszcatalog.resolvePubliccCstj|j|}|S)z3Try to lookup the catalog resource for a system ID )r2ZxmlACatalogResolveSystemr)rrr*rrr resolveSystemszcatalog.resolveSystemcCstj|j|}|S)z*Do a complete resolution lookup of an URI )r2ZxmlACatalogResolveURIr)rrr*rrr resolveURIszcatalog.resolveURI)N)rrrrr5rrrr>rrrrrrrrrr s  r c@sVeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ dS)rNcCs,t|dkrtd||_tj||ddS)Nrz&xmlDtd got a wrong wrapper object type)r )rrurrr)rr rrrrs zxmlDtd.__init__cCsd|jtt|fS)Nz)rCrvr)rrrrrwszxmlDtd.__repr__cCstj||jdS)z$Dumps debug information for the DTD N)r2ZxmlDebugDumpDTDr)rrrrr debugDumpDTDszxmlDtd.debugDumpDTDcCs*tj|j}|dkrtdt|d}|S)zDo a copy of the dtd. NzxmlCopyDtd() failed)r )r2Z xmlCopyDtdrrr)rr* _xmlDtd__tmprrrcopyDtds   zxmlDtd.copyDtdcCstj|jdS)zFree a DTD structure. N)r2Z xmlFreeDtdr)rrrrfreeDtdszxmlDtd.freeDtdcCs.tj|j||}|dkr tdt|d}|S)zQSearch the DTD for the description of this attribute on this element. NzxmlGetDtdAttrDesc() failed)r )r2ZxmlGetDtdAttrDescrrr)rrPrCr*rrrr dtdAttrDescs  zxmlDtd.dtdAttrDesccCs,tj|j|}|dkrtdt|d}|S)z3Search the DTD for the description of this element NzxmlGetDtdElementDesc() failed)r )r2ZxmlGetDtdElementDescrrr)rrCr*rrrrdtdElementDescs  zxmlDtd.dtdElementDesccCs0tj|j|||}|dkr"tdt|d}|S)z[Search the DTD for the description of this qualified attribute on this element. NzxmlGetDtdQAttrDesc() failed)r )r2ZxmlGetDtdQAttrDescrrr)rrPrCryr*rrrr dtdQAttrDesc s  zxmlDtd.dtdQAttrDesccCs.tj|j||}|dkr tdt|d}|S)z3Search the DTD for the description of this element NzxmlGetDtdQElementDesc() failed)r )r2ZxmlGetDtdQElementDescrrr)rrCryr*rrrrdtdQElementDescs  zxmlDtd.dtdQElementDesc)N) rrrrrwrrrrrrrrrrrrs rc@seZdZdddZddZdS)rNcCs,t|dkrtd||_tj||ddS)Nrz*xmlElement got a wrong wrapper object type)r )rrurrr)rr rrrrs zxmlElement.__init__cCsd|jtt|fS)Nz )rCrvr)rrrrrw szxmlElement.__repr__)N)rrrrrwrrrrrs rc@s.eZdZd ddZddZddZdd ZdS) rNcCs,t|dkrtd||_tj||ddS)Nrz)xmlEntity got a wrong wrapper object type)r )rrurrr)rr rrrr$s zxmlEntity.__init__cCsd|jtt|fS)Nz)rCrvr)rrrrrw)szxmlEntity.__repr__cCstj|jdS)N)r2Z xmlFreeEntityr)rrrr freeEntity0szxmlEntity.freeEntitycCs&|dkrd}n|j}tj||jdS)zDefault handling of defined entities, when should we define a new input stream ? When do we just handle that as a set of chars ? OBSOLETE: to be removed at some point. N)rr2r)rrr`rrrr7szxmlEntity.handleEntity)N)rrrrrwr rrrrrr#s rc@seZdZd&ddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%ZdS)'rNcCs,t|dkrtd||_tj||ddS)Nrz%xmlNs got a wrong wrapper object type)r )rrurrr)rr rrrr@s zxmlNs.__init__cCsd|jtt|fS)Nz)rCrvr)rrrrrwEszxmlNs.__repr__cCs*tj|j}|dkrtdt|d}|S)zDo a copy of the namespace. NzxmlCopyNamespace() failed)r )r2ZxmlCopyNamespacerrr)rr* _xmlNs__tmprrr copyNamespaceLs   zxmlNs.copyNamespacecCs*tj|j}|dkrtdt|d}|S)z Do a copy of an namespace list. NzxmlCopyNamespaceList() failed)r )r2ZxmlCopyNamespaceListrrr)rr*r rrrcopyNamespaceListSs   zxmlNs.copyNamespaceListcCstj|jdS)z1Free up the structures associated to a namespace N)r2Z xmlFreeNsr)rrrrfreeNsZsz xmlNs.freeNscCstj|jdS)zLFree up all the structures associated to the chained namespaces. N)r2Z xmlFreeNsListr)rrrr freeNsList^szxmlNs.freeNsListcCsD|dkrd}n|j}tj||j||}|dkr6tdt|d}|S)aQCreation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (None). If @ns is None, the newly created element inherits the namespace of @parent. If @content is non None, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references. XML special chars must be escaped first by using xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used. NzxmlNewChild() failed)r )rr2rrr)rr_rCrH parent__or*r rrrrcs  zxmlNs.newChildcCsD|dkrd}n|j}tj||j||}|dkr6tdt|d}|S)atCreation of a new node element within a document. @ns and @content are optional (None). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support. NzxmlNewDocNode() failed)r )rr2rHrr)rrsrCrHrr*r rrrrIus zxmlNs.newDocNodecCsD|dkrd}n|j}tj||j||}|dkr6tdt|d}|S)atCreation of a new node element within a document. @ns and @content are optional (None). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support. NzxmlNewDocNodeEatName() failed)r )rr2rJrr)rrsrCrHrr*r rrrrKs zxmlNs.newDocNodeEatNamecCsD|dkrd}n|j}tj||j||}|dkr6tdt|d}|S)zcCreation of a new node element within a document. @ns and @content are optional (None). NzxmlNewDocRawNode() failed)r )rr2rNrr)rrsrCrHrr*r rrrrOs zxmlNs.newDocRawNodecCs,tj|j|}|dkrtdt|d}|S)zCreation of a new node element. @ns is optional (None). Use of this function is DISCOURAGED in favor of xmlNewDocNodeEatName. NzxmlNewNodeEatName() failed)r )r2ZxmlNewNodeEatNamerrr)rrCr*r rrrnewNodeEatNames  zxmlNs.newNodeEatNamecCsD|dkrd}n|j}tj||j||}|dkr6tdt|d}|S)zPCreate a new property tagged with a namespace and carried by a node. NzxmlNewNsProp() failed)r )rr2rrri)rrrCrr;r*r rrrrs zxmlNs.newNsPropcCsD|dkrd}n|j}tj||j||}|dkr6tdt|d}|S)zPCreate a new property tagged with a namespace and carried by a node. NzxmlNewNsPropEatName() failed)r )rr2rrri)rrrCrr;r*r rrrrs zxmlNs.newNsPropEatNamecCsD|dkrd}n|j}tj||j||}|dkr6tdt|d}|S)aCreation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (None). If @ns is None, the newly created element inherits the namespace of @parent. If @content is non None, a child TEXT node will be created containing the string @content. NOTE: Use xmlNewChild() if @content will contain entities that need to be preserved. Use this function, xmlNewTextChild(), if you need to ensure that reserved XML chars that might appear in @content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations. NzxmlNewTextChild() failed)r )rr2rrr)rr_rCrHrr*r rrrrs  zxmlNs.newTextChildcCs&|dkrd}n|j}tj||jdS)z/Associate a namespace to a node, a posteriori. N)rr2r)rrr;rrrrsz xmlNs.setNscCsD|dkrd}n|j}tj||j||}|dkr6tdt|d}|S)zqSet (or reset) an attribute carried by a node. The ns structure must be in scope, this is not checked NzxmlSetNsProp() failed)r )rr2rrri)rrrCrr;r*r rrrrs zxmlNs.setNsPropcCs(|dkrd}n|j}tj||j|}|S)z'Remove an attribute carried by a node. N)rr2r)rrrCr;r*rrrrs zxmlNs.unsetNsPropcCstj|jdS)zNamespace nodes in libxml don't match the XPath semantic. In a node set the namespace nodes are duplicated and the next pointer is set to the parent node in the XPath semantic. Check if such a node needs to be freed N)r2ZxmlXPathNodeSetFreeNsr)rrrrxpathNodeSetFreeNsszxmlNs.xpathNodeSetFreeNs)N)rrrrrwr r r rrrIrKrOrrrrrrrrrrrrr?s$       rc@sfeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ dS)rhNcCs||_tj||ddS)N)r )rr7r)rr rrrrszoutputBuffer.__init__cCs*|dkrd}n|j}tj|j|||dS)zDump an HTML document. N)rr2r)rrrzr{rrrrrsz+outputBuffer.htmlDocContentDumpFormatOutputcCs(|dkrd}n|j}tj|j||dS)z;Dump an HTML document. Formatting return/spaces are added. N)rr2r)rrrzrrrrrsz%outputBuffer.htmlDocContentDumpOutputcCs@|dkrd}n|j}|dkr"d}n|j}tj|j||||dS)zLDump an HTML node, recursive behaviour,children are printed too. N)rr2r)rrsrrzr{rrrrrrsz%outputBuffer.htmlNodeDumpFormatOutputcCs>|dkrd}n|j}|dkr"d}n|j}tj|j|||dS)zuDump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added. N)rr2r)rrsrrzrrrrrr szoutputBuffer.htmlNodeDumpOutputcCsB|dkrd}n|j}|dkr"d}n|j}tj|j|||||dS)zDump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called N)rr2rU)rrsrrr{rzrrrrrrVszoutputBuffer.nodeDumpOutputcCs(|dkrd}n|j}tj|j||}|S)zDump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call. N)rr2r_)rrrzrr*rrrr`#s zoutputBuffer.saveFileTocCs*|dkrd}n|j}tj|j|||}|S)zDump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call. N)rr2rc)rrrzr{rr*rrrrd,s zoutputBuffer.saveFormatFileTocCstj|j}|S)zKGives a pointer to the data currently held in the output buffer )r2ZxmlOutputBufferGetContentr)rr*rrrr9s zoutputBuffer.getContentcCstj|j||}|S)zWrite the content of the array in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes. )r2ZxmlOutputBufferWriter)rr)rr*rrrr-?szoutputBuffer.writecCstj|j|}|S)zWrite the content of the string in the output I/O buffer This routine handle the I18N transcoding from internal UTF-8 The buffer is lossless, i.e. will store in case of partial or delayed writes. )r2ZxmlOutputBufferWriteStringr)rr.r*rrr writeStringGszoutputBuffer.writeString)N)rrrrrrrrrVr`rdrr-rrrrrrhs      rhc@sFeZdZdddZddZddZdd Zd d Zd d ZddZ dS)rfNcCs||_tj||ddS)N)r )rr0r)rr rrrrPszinputBuffer.__init__cCs |jdkrtj|jd|_dS)N)rr2r6)rrrrr5Ts  zinputBuffer.__del__cCstj|j|}|S)aYGrow up the content of the input buffer, the old data are preserved This routine handle the I18N transcoding to internal UTF-8 This routine is used when operating the parser in normal (pull) mode TODO: one should be able to remove one extra copy by copying directly onto in->buffer or in->raw )r2ZxmlParserInputBufferGrowr)rr)r*rrrgrow]szinputBuffer.growcCstj|j||}|S)zPush the content of the arry in the input buffer This routine handle the I18N transcoding to internal UTF-8 This is used when operating the parser in progressive (push) mode. )r2ZxmlParserInputBufferPushr)rr)rr*rrrpushgszinputBuffer.pushcCstj|j|}|S)zRefresh the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8 )r2ZxmlParserInputBufferReadr)rr)r*rrrr%oszinputBuffer.readcCs,|dkrd}n|j}tj||j|||}|S)z%Setup an XML reader with new options N)rr2xmlTextReaderSetup)rrrrzrrr*rrrSetupzs zinputBuffer.SetupcCs2tj|j|}|dkrtdt|d}||_|S)z2Create an xmlTextReader structure fed with @input NzxmlNewTextReader() failed)r )r2ZxmlNewTextReaderrrrr)rrr*Z_inputBuffer__tmprrr newTextReaders  zinputBuffer.newTextReader)N) rrrrr5rrr%rrrrrrrfOs    rfc@s6eZdZd ddZddZddZdd Zd d ZdS) rNcCs|dkr||_dSd|_dS)N)r)rr rrrrszxmlReg.__init__cCs |jdkrtj|jd|_dS)N)rr2ZxmlRegFreeRegexp)rrrrr5s  zxmlReg.__del__cCstj|j|}|S)z4Check if the regular expression generates the value )r2Z xmlRegexpExecr)rrHr*rrr regexpExecszxmlReg.regexpExeccCstj|j}|S)z/Check if the regular expression is determinist )r2ZxmlRegexpIsDeterministr)rr*rrrregexpIsDeterminists zxmlReg.regexpIsDeterministcCstj||jdS)z5Print the content of the compiled regular expression N)r2ZxmlRegexpPrintr)rrrrr regexpPrintszxmlReg.regexpPrint)N)rrrrr5rrrrrrrrs   rc@s.eZdZd ddZddZddZdd ZdS) rvNcCs|dkr||_dSd|_dS)N)r)rr rrrrszrelaxNgParserCtxt.__init__cCs |jdkrtj|jd|_dS)N)rr2ZxmlRelaxNGFreeParserCtxt)rrrrr5s  zrelaxNgParserCtxt.__del__cCs*tj|j}|dkrtdt|d}|S)zparse a schema definition resource and build an internal XML Schema structure which can be used to validate instances. NzxmlRelaxNGParse() failed)r )r2ZxmlRelaxNGParserr relaxNgSchema)rr*Z_relaxNgParserCtxt__tmprrr relaxNGParses   zrelaxNgParserCtxt.relaxNGParsecCstj|j|}|S)zSemi private function used to pass information to a parser context which are a combination of xmlRelaxNGParserFlag . )r2ZxmlRelaxParserSetFlagr)rrr*rrrrelaxParserSetFlagsz$relaxNgParserCtxt.relaxParserSetFlag)N)rrrrr5rrrrrrrvs   rvc@s>eZdZdddZddZddZdd Zd d Zd d ZdS)rNcCs|dkr||_dSd|_dS)N)r)rr rrrrszrelaxNgSchema.__init__cCs |jdkrtj|jd|_dS)N)rr2ZxmlRelaxNGFree)rrrrr5s  zrelaxNgSchema.__del__cCstj||jdS)zDump a RelaxNG structure back N)r2ZxmlRelaxNGDumpr)rrrrr relaxNGDumpszrelaxNgSchema.relaxNGDumpcCstj||jdS)z#Dump the transformed RelaxNG tree. N)r2ZxmlRelaxNGDumpTreer)rrrrrrelaxNGDumpTreeszrelaxNgSchema.relaxNGDumpTreecCs0tj|j}|dkrtdt|d}||_|S)zOCreate an XML RelaxNGs validation context based on the given schema NzxmlRelaxNGNewValidCtxt() failed)r )r2ZxmlRelaxNGNewValidCtxtrrrelaxNgValidCtxtschema)rr*Z_relaxNgSchema__tmprrrrelaxNGNewValidCtxts   z!relaxNgSchema.relaxNGNewValidCtxtcCs&|dkrd}n|j}tj||j}|S)a6Use RelaxNG to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is None, then RelaxNG validation is deactivated. @ The @schema should not be freed until the reader is deallocated or its use has been deactivated. N)rr2xmlTextReaderRelaxNGSetSchema)rrrr*rrrRelaxNGSetSchemas zrelaxNgSchema.RelaxNGSetSchema)N) rrrrr5rrr"r$rrrrrs    rc@sNeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ dS)r NcCsd|_||_tj||ddS)N)r )r!rrr)rr rrrrszrelaxNgValidCtxt.__init__cCs |jdkrtj|jd|_dS)N)rr2ZxmlRelaxNGFreeValidCtxt)rrrrr5s  zrelaxNgValidCtxt.__del__cCs&|dkrd}n|j}tj|j|}|S)z$Validate a document tree in memory. N)rr2r1)rrsrr*rrrr2s z#relaxNgValidCtxt.relaxNGValidateDoccCs<|dkrd}n|j}|dkr"d}n|j}tj|j||}|S)zValidate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded. N)rr2r3)rrsrPrrr*rrrr4sz+relaxNgValidCtxt.relaxNGValidateFullElementcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||}|S)z7Pop the element end from the RelaxNG validation stack. N)rr2r5)rrsrPrrr*rrrr6sz*relaxNgValidCtxt.relaxNGValidatePopElementcCstj|j||}|S)z;check the CData parsed for validation in the current stack )r2ZxmlRelaxNGValidatePushCDatar)rr@r)r*rrrrelaxNGValidatePushCDatasz)relaxNgValidCtxt.relaxNGValidatePushCDatacCs<|dkrd}n|j}|dkr"d}n|j}tj|j||}|S)z:Push a new element start on the RelaxNG validation stack. N)rr2r7)rrsrPrrr*rrrr8sz+relaxNgValidCtxt.relaxNGValidatePushElementcCs(|dkrd}n|j}tj||j|}|S)zUse RelaxNG schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is None, then RelaxNG schema validation is deactivated. N)rr2 xmlTextReaderRelaxNGValidateCtxt)rrrrr*rrrRelaxNGValidateCtxt,s z$relaxNgValidCtxt.RelaxNGValidateCtxt)N) rrrrr5r2r4r6r%r8r'rrrrr s     r c@s&eZdZdddZddZddZdS) rNcCs|dkr||_dSd|_dS)N)r)rr rrrr7szSchemaParserCtxt.__init__cCs |jdkrtj|jd|_dS)N)rr2ZxmlSchemaFreeParserCtxt)rrrrr5;s  zSchemaParserCtxt.__del__cCs*tj|j}|dkrtdt|d}|S)zparse a schema definition resource and build an internal XML Schema structure which can be used to validate instances. NzxmlSchemaParse() failed)r )r2ZxmlSchemaParserrSchema)rr*Z_SchemaParserCtxt__tmprrr schemaParseDs   zSchemaParserCtxt.schemaParse)N)rrrrr5r)rrrrr6s  rc@s6eZdZd ddZddZddZdd Zd d ZdS) r(NcCs|dkr||_dSd|_dS)N)r)rr rrrrNszSchema.__init__cCs |jdkrtj|jd|_dS)N)rr2Z xmlSchemaFree)rrrrr5Rs  zSchema.__del__cCs&|dkrd}n|j}tj||j}|S)a6Use XSD Schema to validate the document as it is processed. Activation is only possible before the first Read(). if @schema is None, then Schema validation is deactivated. The @schema should not be freed until the reader is deallocated or its use has been deactivated. N)rr2xmlTextReaderSetSchema)rrrr*rrr SetSchema[s zSchema.SetSchemacCstj||jdS)zDump a Schema structure. N)r2Z xmlSchemaDumpr)rrrrr schemaDumpjszSchema.schemaDumpcCs0tj|j}|dkrtdt|d}||_|S)zOCreate an XML Schemas validation context based on the given schema. NzxmlSchemaNewValidCtxt() failed)r )r2ZxmlSchemaNewValidCtxtrrSchemaValidCtxtr!)rr*Z _Schema__tmprrrschemaNewValidCtxtns   zSchema.schemaNewValidCtxt)N)rrrrr5r+r,r.rrrrr(Ms   r(c@sfeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ dS)r-NcCsd|_||_tj||ddS)N)r )r!rrr)rr rrrrxszSchemaValidCtxt.__init__cCs |jdkrtj|jd|_dS)N)rr2ZxmlSchemaFreeValidCtxt)rrrrr5}s  zSchemaValidCtxt.__del__cCs(|dkrd}n|j}tj||j|}|S)zUse W3C XSD schema context to validate the document as it is processed. Activation is only possible before the first Read(). If @ctxt is None, then XML Schema validation is deactivated. N)rr2xmlTextReaderSchemaValidateCtxt)rrrrr*rrrSchemaValidateCtxts z"SchemaValidCtxt.SchemaValidateCtxtcCstj|j}|S)z3Check if any error was detected during validation. )r2ZxmlSchemaIsValidr)rr*rrr schemaIsValids zSchemaValidCtxt.schemaIsValidcCstj|j|}|S)z3Sets the options to be used during the validation. )r2ZxmlSchemaSetValidOptionsr)rrr*rrrschemaSetValidOptionssz%SchemaValidCtxt.schemaSetValidOptionscCstj|j}|S)z$Get the validation context options. )r2ZxmlSchemaValidCtxtGetOptionsr)rr*rrrschemaValidCtxtGetOptionss z)SchemaValidCtxt.schemaValidCtxtGetOptionscCs*tj|j}|dkrtdt|d}|S)zOallow access to the parser context of the schema validation context Nz(xmlSchemaValidCtxtGetParserCtxt() failed)r )r2ZxmlSchemaValidCtxtGetParserCtxtrrr)rr*Z_SchemaValidCtxt__tmprrrschemaValidCtxtGetParserCtxts   z,SchemaValidCtxt.schemaValidCtxtGetParserCtxtcCs&|dkrd}n|j}tj|j|}|S)z$Validate a document tree in memory. N)rr2r)rrsrr*rrrrs z!SchemaValidCtxt.schemaValidateDoccCstj|j||}|S)zpDo a schemas validation of the given resource, it will use the SAX streamable validation internally. )r2ZxmlSchemaValidateFiler)rrrr*rrrschemaValidateFilesz"SchemaValidCtxt.schemaValidateFilecCs&|dkrd}n|j}tj|j|}|S)zd?Z!d@dAZ"dBdCZ#dDdEZ$dFdGZ%dHdIZ&dJdKZ'dLdMZ(dNdOZ)dPdQZ*dRdSZ+dTdUZ,dVdWZ-dXdYZ.dZd[Z/d\d]Z0d^d_Z1d`daZ2dbdcZ3dddeZ4dfdgZ5dhdiZ6djdkZ7dldmZ8dndoZ9dpdqZ:drdsZ;dtduZdzd{Z?d|d}Z@d~dZAddZBddZCdS)rNcCsd|_||_tj||ddS)N)r )rrrr)rr rrrrszxmlTextReader.__init__cCs |jdkrtj|jd|_dS)N)rr2r)rrrrr5s  zxmlTextReader.__del__cCstj|j}|S)z6Provides the number of attributes of the current node )r2ZxmlTextReaderAttributeCountr)rr*rrrAttributeCounts zxmlTextReader.AttributeCountcCstj|j}|S)zThe base URI of the node. )r2ZxmlTextReaderConstBaseUrir)rr*rrrBaseUris zxmlTextReader.BaseUricCstj|j}|S)a@This function provides the current index of the parser used by the reader, relative to the start of the current entity. This function actually just wraps a call to xmlBytesConsumed() for the parser context associated with the reader. See xmlBytesConsumed() for more information. )r2ZxmlTextReaderByteConsumedr)rr*rrr ByteConsumeds zxmlTextReader.ByteConsumedcCstj|j}|S)zThis method releases any resources allocated by the current instance changes the state to Closed and close any underlying input. )r2ZxmlTextReaderCloser)rr*rrrCloses zxmlTextReader.ClosecCs*tj|j}|dkrtdt|d}|S)a]Hacking interface allowing to get the xmlDocPtr corresponding to the current document being accessed by the xmlTextReader. NOTE: as a result of this call, the reader will not destroy the associated XML document and calling xmlFreeDoc() on the result is needed once the reader parsing has finished. Nz xmlTextReaderCurrentDoc() failed)r )r2ZxmlTextReaderCurrentDocrrrt)rr*_xmlTextReader__tmprrr CurrentDocs   zxmlTextReader.CurrentDoccCs*tj|j}|dkrtdt|d}|S)zHacking interface allowing to get the xmlNodePtr corresponding to the current node being accessed by the xmlTextReader. This is dangerous because the underlying node may be destroyed on the next Reads. Nz!xmlTextReaderCurrentNode() failed)r )r2ZxmlTextReaderCurrentNoderrr)rr*r=rrr CurrentNode s   zxmlTextReader.CurrentNodecCstj|j}|S)z#The depth of the node in the tree. )r2ZxmlTextReaderDepthr)rr*rrrDepths zxmlTextReader.DepthcCstj|j}|S)z3Determine the encoding of the document being read. )r2ZxmlTextReaderConstEncodingr)rr*rrrEncodings zxmlTextReader.EncodingcCs*tj|j}|dkrtdt|d}|S)zReads the contents of the current node and the full subtree. It then makes the subtree available until the next xmlTextReaderRead() call NzxmlTextReaderExpand() failed)r )r2ZxmlTextReaderExpandrrr)rr*r=rrrExpand s   zxmlTextReader.ExpandcCstj|j|}|S)zRProvides the value of the attribute with the specified qualified name. )r2ZxmlTextReaderGetAttributer)rrCr*rrr GetAttribute)szxmlTextReader.GetAttributecCstj|j|}|S)zlProvides the value of the attribute with the specified index relative to the containing element. )r2ZxmlTextReaderGetAttributeNor)rnor*rrrGetAttributeNo/szxmlTextReader.GetAttributeNocCstj|j||}|S)z.Provides the value of the specified attribute )r2ZxmlTextReaderGetAttributeNsr)r localName namespaceURIr*rrrGetAttributeNs5szxmlTextReader.GetAttributeNscCstj|j}|S)z8Provide the column number of the current parsing point. )r2Z"xmlTextReaderGetParserColumnNumberr)rr*rrrGetParserColumnNumber:s z#xmlTextReader.GetParserColumnNumbercCstj|j}|S)z6Provide the line number of the current parsing point. )r2Z xmlTextReaderGetParserLineNumberr)rr*rrrGetParserLineNumber?s z!xmlTextReader.GetParserLineNumbercCstj|j|}|S)z#Read the parser internal property. )r2ZxmlTextReaderGetParserPropr)rrr*rrr GetParserPropDszxmlTextReader.GetParserPropcCs*tj|j}|dkrtdt|d}|S)aMethod to get the remainder of the buffered XML. this method stops the parser, set its state to End Of File and return the input stream with what is left that the parser did not use. The implementation is not good, the parser certainly progressed past what's left in reader->input, and there is an allocation problem. Best would be to rewrite it differently. Nz"xmlTextReaderGetRemainder() failed)r )r2ZxmlTextReaderGetRemainderrrrf)rr*r=rrr GetRemainderIs   zxmlTextReader.GetRemaindercCstj|j}|S)z!Whether the node has attributes. )r2ZxmlTextReaderHasAttributesr)rr*rrr HasAttributesVs zxmlTextReader.HasAttributescCstj|j}|S)z(Whether the node can have a text value. )r2ZxmlTextReaderHasValuer)rr*rrrHasValue[s zxmlTextReader.HasValuecCstj|j}|S)ziWhether an Attribute node was generated from the default value defined in the DTD or schema. )r2ZxmlTextReaderIsDefaultr)rr*rrr IsDefault`s zxmlTextReader.IsDefaultcCstj|j}|S)z#Check if the current node is empty )r2ZxmlTextReaderIsEmptyElementr)rr*rrrIsEmptyElementfs zxmlTextReader.IsEmptyElementcCstj|j}|S)zjDetermine whether the current node is a namespace declaration rather than a regular attribute. )r2ZxmlTextReaderIsNamespaceDeclr)rr*rrrIsNamespaceDeclks zxmlTextReader.IsNamespaceDeclcCstj|j}|S)z5Retrieve the validity status from the parser context )r2ZxmlTextReaderIsValidr)rr*rrrIsValidqs zxmlTextReader.IsValidcCstj|j}|S)zThe local name of the node. )r2ZxmlTextReaderConstLocalNamer)rr*rrr LocalNamevs zxmlTextReader.LocalNamecCstj|j|}|S)zLResolves a namespace prefix in the scope of the current element. )r2ZxmlTextReaderLookupNamespacer)rryr*rrrLookupNamespace{szxmlTextReader.LookupNamespacecCstj|j|}|S)zjMoves the position of the current instance to the attribute with the specified qualified name. )r2ZxmlTextReaderMoveToAttributer)rrCr*rrrMoveToAttributeszxmlTextReader.MoveToAttributecCstj|j|}|S)zMoves the position of the current instance to the attribute with the specified index relative to the containing element. )r2ZxmlTextReaderMoveToAttributeNor)rrDr*rrrMoveToAttributeNoszxmlTextReader.MoveToAttributeNocCstj|j||}|S)zxMoves the position of the current instance to the attribute with the specified local name and namespace URI. )r2ZxmlTextReaderMoveToAttributeNsr)rrFrGr*rrrMoveToAttributeNsszxmlTextReader.MoveToAttributeNscCstj|j}|S)zmMoves the position of the current instance to the node that contains the current Attribute node. )r2ZxmlTextReaderMoveToElementr)rr*rrr MoveToElements zxmlTextReader.MoveToElementcCstj|j}|S)zoMoves the position of the current instance to the first attribute associated with the current node. )r2Z!xmlTextReaderMoveToFirstAttributer)rr*rrrMoveToFirstAttributes z"xmlTextReader.MoveToFirstAttributecCstj|j}|S)znMoves the position of the current instance to the next attribute associated with the current node. )r2Z xmlTextReaderMoveToNextAttributer)rr*rrrMoveToNextAttributes z!xmlTextReader.MoveToNextAttributecCstj|j}|S)zr?r@rArBrCrErHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rrarbrcrdrerfrgrhrirjrkrlrmr$rpr'rqr0rrr+rrsrtrurvrwrrrrrs              rc@seZdZd4ddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3ZdS)5rNcCs|dkr||_dSd|_dS)N)r)rr rrrrsz URI.__init__cCs |jdkrtj|jd|_dS)N)rr2Z xmlFreeURI)rrrrr5s  z URI.__del__cCstj|j}|S)z#Get the authority part from an URI )r2ZxmlURIGetAuthorityr)rr*rrr authoritys z URI.authoritycCstj|j}|S)z"Get the fragment part from an URI )r2ZxmlURIGetFragmentr)rr*rrrfragments z URI.fragmentcCstj|j}|S)z Get the opaque part from an URI )r2ZxmlURIGetOpaquer)rr*rrropaques z URI.opaquecCstj|j}|S)zGet the path part from an URI )r2Z xmlURIGetPathr)rr*rrrrs zURI.pathcCstj|j}|S)zGet the port part from an URI )r2Z xmlURIGetPortr)rr*rrrr/s zURI.portcCstj|j}|S)zGet the query part from an URI )r2ZxmlURIGetQueryr)rr*rrrquerys z URI.querycCstj|j}|S)zIGet the raw query part from an URI (i.e. the unescaped form). )r2ZxmlURIGetQueryRawr)rr*rrrqueryRaws z URI.queryRawcCstj|j}|S)z Get the scheme part from an URI )r2ZxmlURIGetSchemer)rr*rrrschemes z URI.schemecCstj|j}|S)z Get the server part from an URI )r2ZxmlURIGetServerr)rr*rrrservers z URI.servercCstj|j|dS)z"Set the authority part of an URI. N)r2ZxmlURISetAuthorityr)rrxrrr setAuthorityszURI.setAuthoritycCstj|j|dS)z!Set the fragment part of an URI. N)r2ZxmlURISetFragmentr)rryrrr setFragmentszURI.setFragmentcCstj|j|dS)zSet the opaque part of an URI. N)r2ZxmlURISetOpaquer)rrzrrr setOpaquesz URI.setOpaquecCstj|j|dS)zSet the path part of an URI. N)r2Z xmlURISetPathr)rrrrrsetPathsz URI.setPathcCstj|j|dS)zSet the port part of an URI. N)r2Z xmlURISetPortr)rr/rrrsetPortsz URI.setPortcCstj|j|dS)zSet the query part of an URI. N)r2ZxmlURISetQueryr)rr{rrrsetQuerysz URI.setQuerycCstj|j|dS)zvalid accordingly N)rr2rp)rrsrPrCrrrr*rrrrqs z*ValidCtxt.validCtxtNormalizeAttributeValuecCs&|dkrd}n|j}tj|j|}|S)zTry to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree. N)rr2rr)rrsrr*rrrrs's zValidCtxt.validateDocumentcCs&|dkrd}n|j}tj|j|}|S)aDoes the final step for the document validation once all the incremental validation steps have been completed basically it does the following checks described by the XML Rec Check all the IDREF/IDREFS attributes definition for validity N)rr2rt)rrsrr*rrrru1s zValidCtxt.validateDocumentFinalcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||}|S)aTry to validate the document against the dtd instance Basically it does check all the definitions in the DtD. Note the the internal subset (if present) is de-coupled (i.e. not used), which could give problems if ID or IDREF is present. N)rr2rv)rrsrrrwr*rrrrx<szValidCtxt.validateDtdcCs&|dkrd}n|j}tj|j|}|S)aDoes the final step for the dtds validation once all the subsets have been parsed basically it does the following checks described by the XML Rec - check that ENTITY and ENTITIES type attributes default or possible values matches one of the defined entities. - check that NOTATION type attributes default or possible values matches one of the defined notations. N)rr2ry)rrsrr*rrrrzIs zValidCtxt.validateDtdFinalcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||}|S)z-Try to validate the subtree under an element N)rr2r{)rrsrfrrgr*rrrr|VszValidCtxt.validateElementcCs(|dkrd}n|j}tj|j||}|S)zbValidate that the given name match a notation declaration. - [ VC: Notation Declared ] N)rr2r})rrsrSrr*rrrr~_s zValidCtxt.validateNotationUsec CsT|dkrd}n|j}|dkr"d}n|j}|dkr6d}n|j}tj|j||||}|S)aTry to validate a single attribute for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately N)rr2r) rrsrPrxrrrrr*rrrrgszValidCtxt.validateOneAttributecCs<|dkrd}n|j}|dkr"d}n|j}tj|j||}|S)a]Try to validate a single element and it's attributes, basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC: Required Attribute ] Then call xmlValidateOneAttribute() for each attribute present. The ID/IDREF checkings are done separately N)rr2r)rrsrPrrr*rrrrxszValidCtxt.validateOneElementc CsV|dkrd}n|j}|dkr"d}n|j}|dkr6d}n|j}tj|j|||||} | S)aTry to validate a single namespace declaration for an element basically it does the following checks as described by the XML-1.0 recommendation: - [ VC: Attribute Value Type ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity Name ] - [ VC: Notation Attributes ] The ID/IDREF uniqueness and matching are done separately N)rr2r) rrsrPryryrrrrr*rrrrszValidCtxt.validateOneNamespacecCs>|dkrd}n|j}|dkr"d}n|j}tj|j|||}|S)z/Pop the element end from the validation stack. N)rr2r)rrsrPrrrr*rrrrszValidCtxt.validatePopElementcCstj|j||}|S)z;check the CData parsed for validation in the current stack )r2ZxmlValidatePushCDatar)rr@r)r*rrrvalidatePushCDataszValidCtxt.validatePushCDatacCs>|dkrd}n|j}|dkr"d}n|j}tj|j|||}|S)z2Push a new element start on the validation stack. N)rr2r)rrsrPrrrr*rrrrszValidCtxt.validatePushElementcCs&|dkrd}n|j}tj|j|}|S)zTry to validate a the root element basically it does the following check as described by the XML-1.0 recommendation: - [ VC: Root Element Type ] it doesn't try to recurse or apply other check to the element N)rr2r)rrsrr*rrrrs zValidCtxt.validateRoot)N)rrrrr5rqrsrurxrzr|r~rrrrrrrrrrrr s          rc@seZdZd4ddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3ZdS)5r NcCs|dkr||_dSd|_dS)N)r)rr rrrrszxpathContext.__init__cCs*tj|j}|dkrtdt|d}|S)z!Get the doc from an xpathContext NzxmlXPathGetContextDoc() failed)r )r2ZxmlXPathGetContextDocrrrt)rr*_xpathContext__tmprrr contextDocs   zxpathContext.contextDoccCs*tj|j}|dkrtdt|d}|S)z*Get the current node from an xpathContext NzxmlXPathGetContextNode() failed)r )r2ZxmlXPathGetContextNoderrr)rr*rrrr contextNodes   zxpathContext.contextNodecCstj|j}|S)z*Get the current node from an xpathContext )r2ZxmlXPathGetContextPositionr)rr*rrrcontextPositions zxpathContext.contextPositioncCstj|j}|S)z*Get the current node from an xpathContext )r2ZxmlXPathGetContextSizer)rr*rrr contextSizes zxpathContext.contextSizecCstj|j}|S)z+Get the current function name xpathContext )r2ZxmlXPathGetFunctionr)rr*rrrfunctions zxpathContext.functioncCstj|j}|S)z/Get the current function name URI xpathContext )r2ZxmlXPathGetFunctionURIr)rr*rrr functionURIs zxpathContext.functionURIcCs&|dkrd}n|j}tj|j|dS)zSet the doc of an xpathContext N)rr2ZxmlXPathSetContextDoc)rrsrrrr setContextDocszxpathContext.setContextDoccCs&|dkrd}n|j}tj|j|dS)z(Set the current node of an xpathContext N)rr2ZxmlXPathSetContextNode)rrr;rrrrszxpathContext.setContextNodecCstj|j|||}|S)zd?Z!d@dAZ"dBdCZ#dDdEZ$dFdGZ%dHdIZ&dJdKZ'dLdMZ(dNdOZ)dPdQZ*dRdSZ+dTdUZ,dVdWZ-dXdYZ.dZd[Z/d\d]Z0d^d_Z1d`daZ2dbdcZ3dddeZ4dfdgZ5dhdiZ6djdkZ7dldmZ8dndoZ9dpdqZ:drdsZ;dtduZdzd{Z?d|d}Z@dS)rNcCs|dkr||_dSd|_dS)N)r)rr rrrr]szxpathParserContext.__init__cCs*tj|j}|dkrtdt|d}|S)z0Get the xpathContext from an xpathParserContext Nz!xmlXPathParserGetContext() failed)r )r2ZxmlXPathParserGetContextrrr )rr*_xpathParserContext__tmprrrcontextbs   zxpathParserContext.contextcCstj|jdS)zImplement the add operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function. N)r2ZxmlXPathAddValuesr)rrrrxpathAddValuesmsz!xpathParserContext.xpathAddValuescCstj|j|dS)auImplement the boolean() XPath function boolean boolean(object) The boolean function converts its argument to a boolean as follows: - a number is true if and only if it is neither positive or negative zero nor NaN - a node-set is true if and only if it is non-empty - a string is true if and only if its length is non-zero N)r2ZxmlXPathBooleanFunctionr)rnargsrrrxpathBooleanFunctionssz'xpathParserContext.xpathBooleanFunctioncCstj|j|dS)zImplement the ceiling() XPath function number ceiling(number) The ceiling function returns the smallest (closest to negative infinity) number that is not less than the argument and that is an integer. N)r2ZxmlXPathCeilingFunctionr)rrrrrxpathCeilingFunction|sz'xpathParserContext.xpathCeilingFunctioncCstj|j||}|S)aImplement the compare operation on XPath objects: @arg1 < @arg2 (1, 1, ... @arg1 <= @arg2 (1, 0, ... @arg1 > @arg2 (0, 1, ... @arg1 >= @arg2 (0, 0, ... When neither object to be compared is a node-set and the operator is <=, <, >=, >, then the objects are compared by converted both objects to numbers and comparing the numbers according to IEEE 754. The < comparison will be true if and only if the first number is less than the second number. The <= comparison will be true if and only if the first number is less than or equal to the second number. The > comparison will be true if and only if the first number is greater than the second number. The >= comparison will be true if and only if the first number is greater than or equal to the second number. )r2ZxmlXPathCompareValuesr)rinfstrictr*rrrxpathCompareValuessz%xpathParserContext.xpathCompareValuescCstj|j|dS)zImplement the concat() XPath function string concat(string, string, string*) The concat function returns the concatenation of its arguments. N)r2ZxmlXPathConcatFunctionr)rrrrrxpathConcatFunctionsz&xpathParserContext.xpathConcatFunctioncCstj|j|dS)zImplement the contains() XPath function boolean contains(string, string) The contains function returns true if the first argument string contains the second argument string, and otherwise returns false. N)r2ZxmlXPathContainsFunctionr)rrrrrxpathContainsFunctionsz(xpathParserContext.xpathContainsFunctioncCstj|j|dS)z?ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqiiiiiiiiiiiiiiiiiiiiii i i i i iiiiiiiiiiiiiiiii i!i"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii i i i i iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiXiYiZi[i\i]i^i_i`iaibiiiiiiiiiiiiiiiiiiiiiiiiiiixiyizi{iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii i i i i iiiiiiii@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRirisitiuiviiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii i i i i iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiliminioiiiiiiiiiiiiii i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i iii$i%iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiipiqirisitiXii@iiiiii@ir r r (r2typesrr&rrrrrrrrr0r7r:rXrrr`rrZPARSER_LOADDTDZPARSER_DEFAULTATTRSZPARSER_VALIDATEZPARSER_SUBST_ENTITIESZ PARSER_SEVERITY_VALIDITY_WARNINGZPARSER_SEVERITY_VALIDITY_ERRORZPARSER_SEVERITY_WARNINGZPARSER_SEVERITY_ERRORrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r r r rrrrrrrrrrrrrrrrr!r"r#r$r%r&r'r(r)r*r+r,r-r1r2r3r4r5r6r7r8r9r:r<r=r>r?r@rArBrCrDrErFrGrHrIrKrLrMrNrOrPrQrRrTrUrVrYrZr[r\r^r_rarbrcrergrirkrlrmrnrorprqrrrsrtrurwrxrzr{r|r}r~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r r r r rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrrtrrrirr rrrrrhrfrrvrr rr(r-rrrrr rZHTML_NAZ HTML_INVALIDZHTML_DEPRECATEDZ HTML_VALIDZ HTML_REQUIREDZHTML_PARSE_RECOVERZHTML_PARSE_NODEFDTDZHTML_PARSE_NOERRORZHTML_PARSE_NOWARNINGZHTML_PARSE_PEDANTICZHTML_PARSE_NOBLANKSZHTML_PARSE_NONETZHTML_PARSE_NOIMPLIEDZHTML_PARSE_COMPACTZHTML_PARSE_IGNORE_ENCZXLINK_ACTUATE_NONEZXLINK_ACTUATE_AUTOZXLINK_ACTUATE_ONREQUESTZXLINK_SHOW_NONEZXLINK_SHOW_NEWZXLINK_SHOW_EMBEDZXLINK_SHOW_REPLACEZXLINK_TYPE_NONEZXLINK_TYPE_SIMPLEZXLINK_TYPE_EXTENDEDZXLINK_TYPE_EXTENDED_SETZXML_ATTRIBUTE_CDATAZXML_ATTRIBUTE_IDZXML_ATTRIBUTE_IDREFZXML_ATTRIBUTE_IDREFSZXML_ATTRIBUTE_ENTITYZXML_ATTRIBUTE_ENTITIESZXML_ATTRIBUTE_NMTOKENZXML_ATTRIBUTE_NMTOKENSZXML_ATTRIBUTE_ENUMERATIONZXML_ATTRIBUTE_NOTATIONZXML_ELEMENT_NODEZXML_ATTRIBUTE_NODEZ XML_TEXT_NODEZXML_CDATA_SECTION_NODEZXML_ENTITY_REF_NODEZXML_ENTITY_NODEZ XML_PI_NODEZXML_COMMENT_NODEZXML_DOCUMENT_NODEZXML_DOCUMENT_TYPE_NODEZXML_DOCUMENT_FRAG_NODEZXML_NOTATION_NODEZXML_HTML_DOCUMENT_NODEZ XML_DTD_NODEZXML_ELEMENT_DECLZXML_ATTRIBUTE_DECLZXML_ENTITY_DECLZXML_NAMESPACE_DECLZXML_XINCLUDE_STARTZXML_XINCLUDE_ENDZXML_ATTRIBUTE_NONEZXML_ATTRIBUTE_REQUIREDZXML_ATTRIBUTE_IMPLIEDZXML_ATTRIBUTE_FIXEDZXML_BUFFER_ALLOC_DOUBLEITZXML_BUFFER_ALLOC_EXACTZXML_BUFFER_ALLOC_IMMUTABLEZXML_BUFFER_ALLOC_IOZXML_BUFFER_ALLOC_HYBRIDZXML_BUFFER_ALLOC_BOUNDEDZ XML_ERR_OKZXML_ERR_INTERNAL_ERRORZXML_ERR_NO_MEMORYZXML_ERR_DOCUMENT_STARTZXML_ERR_DOCUMENT_EMPTYZXML_ERR_DOCUMENT_ENDZXML_ERR_INVALID_HEX_CHARREFZXML_ERR_INVALID_DEC_CHARREFZXML_ERR_INVALID_CHARREFZXML_ERR_INVALID_CHARZXML_ERR_CHARREF_AT_EOFZXML_ERR_CHARREF_IN_PROLOGZXML_ERR_CHARREF_IN_EPILOGZXML_ERR_CHARREF_IN_DTDZXML_ERR_ENTITYREF_AT_EOFZXML_ERR_ENTITYREF_IN_PROLOGZXML_ERR_ENTITYREF_IN_EPILOGZXML_ERR_ENTITYREF_IN_DTDZXML_ERR_PEREF_AT_EOFZXML_ERR_PEREF_IN_PROLOGZXML_ERR_PEREF_IN_EPILOGZXML_ERR_PEREF_IN_INT_SUBSETZXML_ERR_ENTITYREF_NO_NAMEZ!XML_ERR_ENTITYREF_SEMICOL_MISSINGZXML_ERR_PEREF_NO_NAMEZXML_ERR_PEREF_SEMICOL_MISSINGZXML_ERR_UNDECLARED_ENTITYZXML_WAR_UNDECLARED_ENTITYZXML_ERR_UNPARSED_ENTITYZXML_ERR_ENTITY_IS_EXTERNALZXML_ERR_ENTITY_IS_PARAMETERZXML_ERR_UNKNOWN_ENCODINGZXML_ERR_UNSUPPORTED_ENCODINGZXML_ERR_STRING_NOT_STARTEDZXML_ERR_STRING_NOT_CLOSEDZXML_ERR_NS_DECL_ERRORZXML_ERR_ENTITY_NOT_STARTEDZXML_ERR_ENTITY_NOT_FINISHEDZXML_ERR_LT_IN_ATTRIBUTEZXML_ERR_ATTRIBUTE_NOT_STARTEDZXML_ERR_ATTRIBUTE_NOT_FINISHEDZXML_ERR_ATTRIBUTE_WITHOUT_VALUEZXML_ERR_ATTRIBUTE_REDEFINEDZXML_ERR_LITERAL_NOT_STARTEDZXML_ERR_LITERAL_NOT_FINISHEDZXML_ERR_COMMENT_NOT_FINISHEDZXML_ERR_PI_NOT_STARTEDZXML_ERR_PI_NOT_FINISHEDZXML_ERR_NOTATION_NOT_STARTEDZXML_ERR_NOTATION_NOT_FINISHEDZXML_ERR_ATTLIST_NOT_STARTEDZXML_ERR_ATTLIST_NOT_FINISHEDZXML_ERR_MIXED_NOT_STARTEDZXML_ERR_MIXED_NOT_FINISHEDZXML_ERR_ELEMCONTENT_NOT_STARTEDZ XML_ERR_ELEMCONTENT_NOT_FINISHEDZXML_ERR_XMLDECL_NOT_STARTEDZXML_ERR_XMLDECL_NOT_FINISHEDZXML_ERR_CONDSEC_NOT_STARTEDZXML_ERR_CONDSEC_NOT_FINISHEDZXML_ERR_EXT_SUBSET_NOT_FINISHEDZXML_ERR_DOCTYPE_NOT_FINISHEDZXML_ERR_MISPLACED_CDATA_ENDZXML_ERR_CDATA_NOT_FINISHEDZXML_ERR_RESERVED_XML_NAMEZXML_ERR_SPACE_REQUIREDZXML_ERR_SEPARATOR_REQUIREDZXML_ERR_NMTOKEN_REQUIREDZXML_ERR_NAME_REQUIREDZXML_ERR_PCDATA_REQUIREDZXML_ERR_URI_REQUIREDZXML_ERR_PUBID_REQUIREDZXML_ERR_LT_REQUIREDZXML_ERR_GT_REQUIREDZXML_ERR_LTSLASH_REQUIREDZXML_ERR_EQUAL_REQUIREDZXML_ERR_TAG_NAME_MISMATCHZXML_ERR_TAG_NOT_FINISHEDZXML_ERR_STANDALONE_VALUEZXML_ERR_ENCODING_NAMEZXML_ERR_HYPHEN_IN_COMMENTZXML_ERR_INVALID_ENCODINGZXML_ERR_EXT_ENTITY_STANDALONEZXML_ERR_CONDSEC_INVALIDZXML_ERR_VALUE_REQUIREDZXML_ERR_NOT_WELL_BALANCEDZXML_ERR_EXTRA_CONTENTZXML_ERR_ENTITY_CHAR_ERRORZXML_ERR_ENTITY_PE_INTERNALZXML_ERR_ENTITY_LOOPZXML_ERR_ENTITY_BOUNDARYZXML_ERR_INVALID_URIZXML_ERR_URI_FRAGMENTZXML_WAR_CATALOG_PIZXML_ERR_NO_DTDZXML_ERR_CONDSEC_INVALID_KEYWORDZXML_ERR_VERSION_MISSINGZXML_WAR_UNKNOWN_VERSIONZXML_WAR_LANG_VALUEZXML_WAR_NS_URIZXML_WAR_NS_URI_RELATIVEZXML_ERR_MISSING_ENCODINGZXML_WAR_SPACE_VALUEZXML_ERR_NOT_STANDALONEZXML_ERR_ENTITY_PROCESSINGZXML_ERR_NOTATION_PROCESSINGZXML_WAR_NS_COLUMNZXML_WAR_ENTITY_REDEFINEDZXML_ERR_UNKNOWN_VERSIONZXML_ERR_VERSION_MISMATCHZXML_ERR_NAME_TOO_LONGZXML_ERR_USER_STOPZXML_ERR_COMMENT_ABRUPTLY_ENDEDZXML_WAR_ENCODING_MISMATCHZXML_NS_ERR_XML_NAMESPACEZXML_NS_ERR_UNDEFINED_NAMESPACEZXML_NS_ERR_QNAMEZXML_NS_ERR_ATTRIBUTE_REDEFINEDZXML_NS_ERR_EMPTYZXML_NS_ERR_COLONZXML_DTD_ATTRIBUTE_DEFAULTZXML_DTD_ATTRIBUTE_REDEFINEDZXML_DTD_ATTRIBUTE_VALUEZXML_DTD_CONTENT_ERRORZXML_DTD_CONTENT_MODELZXML_DTD_CONTENT_NOT_DETERMINISTZXML_DTD_DIFFERENT_PREFIXZXML_DTD_ELEM_DEFAULT_NAMESPACEZXML_DTD_ELEM_NAMESPACEZXML_DTD_ELEM_REDEFINEDZXML_DTD_EMPTY_NOTATIONZXML_DTD_ENTITY_TYPEZXML_DTD_ID_FIXEDZXML_DTD_ID_REDEFINEDZXML_DTD_ID_SUBSETZXML_DTD_INVALID_CHILDZXML_DTD_INVALID_DEFAULTZXML_DTD_LOAD_ERRORZXML_DTD_MISSING_ATTRIBUTEZXML_DTD_MIXED_CORRUPTZXML_DTD_MULTIPLE_IDZXML_DTD_NO_DOCZXML_DTD_NO_DTDZXML_DTD_NO_ELEM_NAMEZXML_DTD_NO_PREFIXZXML_DTD_NO_ROOTZXML_DTD_NOTATION_REDEFINEDZXML_DTD_NOTATION_VALUEZXML_DTD_NOT_EMPTYZXML_DTD_NOT_PCDATAZXML_DTD_NOT_STANDALONEZXML_DTD_ROOT_NAMEZXML_DTD_STANDALONE_WHITE_SPACEZXML_DTD_UNKNOWN_ATTRIBUTEZXML_DTD_UNKNOWN_ELEMZXML_DTD_UNKNOWN_ENTITYZXML_DTD_UNKNOWN_IDZXML_DTD_UNKNOWN_NOTATIONZXML_DTD_STANDALONE_DEFAULTEDZXML_DTD_XMLID_VALUEZXML_DTD_XMLID_TYPEZXML_DTD_DUP_TOKENZXML_HTML_STRUCURE_ERRORZXML_HTML_UNKNOWN_TAGZ#XML_HTML_INCORRECTLY_OPENED_COMMENTZXML_RNGP_ANYNAME_ATTR_ANCESTORZXML_RNGP_ATTR_CONFLICTZXML_RNGP_ATTRIBUTE_CHILDRENZXML_RNGP_ATTRIBUTE_CONTENTZXML_RNGP_ATTRIBUTE_EMPTYZXML_RNGP_ATTRIBUTE_NOOPZXML_RNGP_CHOICE_CONTENTZXML_RNGP_CHOICE_EMPTYZXML_RNGP_CREATE_FAILUREZXML_RNGP_DATA_CONTENTZ"XML_RNGP_DEF_CHOICE_AND_INTERLEAVEZXML_RNGP_DEFINE_CREATE_FAILEDZXML_RNGP_DEFINE_EMPTYZXML_RNGP_DEFINE_MISSINGZXML_RNGP_DEFINE_NAME_MISSINGZXML_RNGP_ELEM_CONTENT_EMPTYZXML_RNGP_ELEM_CONTENT_ERRORZXML_RNGP_ELEMENT_EMPTYZXML_RNGP_ELEMENT_CONTENTZXML_RNGP_ELEMENT_NAMEZXML_RNGP_ELEMENT_NO_CONTENTZXML_RNGP_ELEM_TEXT_CONFLICTZXML_RNGP_EMPTYZXML_RNGP_EMPTY_CONSTRUCTZXML_RNGP_EMPTY_CONTENTZXML_RNGP_EMPTY_NOT_EMPTYZXML_RNGP_ERROR_TYPE_LIBZXML_RNGP_EXCEPT_EMPTYZXML_RNGP_EXCEPT_MISSINGZXML_RNGP_EXCEPT_MULTIPLEZXML_RNGP_EXCEPT_NO_CONTENTZXML_RNGP_EXTERNALREF_EMTPYZXML_RNGP_EXTERNAL_REF_FAILUREZXML_RNGP_EXTERNALREF_RECURSEZXML_RNGP_FORBIDDEN_ATTRIBUTEZXML_RNGP_FOREIGN_ELEMENTZXML_RNGP_GRAMMAR_CONTENTZXML_RNGP_GRAMMAR_EMPTYZXML_RNGP_GRAMMAR_MISSINGZXML_RNGP_GRAMMAR_NO_STARTZXML_RNGP_GROUP_ATTR_CONFLICTZXML_RNGP_HREF_ERRORZXML_RNGP_INCLUDE_EMPTYZXML_RNGP_INCLUDE_FAILUREZXML_RNGP_INCLUDE_RECURSEZXML_RNGP_INTERLEAVE_ADDZ!XML_RNGP_INTERLEAVE_CREATE_FAILEDZXML_RNGP_INTERLEAVE_EMPTYZXML_RNGP_INTERLEAVE_NO_CONTENTZXML_RNGP_INVALID_DEFINE_NAMEZXML_RNGP_INVALID_URIZXML_RNGP_INVALID_VALUEZXML_RNGP_MISSING_HREFZXML_RNGP_NAME_MISSINGZXML_RNGP_NEED_COMBINEZXML_RNGP_NOTALLOWED_NOT_EMPTYZXML_RNGP_NSNAME_ATTR_ANCESTORZXML_RNGP_NSNAME_NO_NSZXML_RNGP_PARAM_FORBIDDENZXML_RNGP_PARAM_NAME_MISSINGZ XML_RNGP_PARENTREF_CREATE_FAILEDZXML_RNGP_PARENTREF_NAME_INVALIDZXML_RNGP_PARENTREF_NO_NAMEZXML_RNGP_PARENTREF_NO_PARENTZXML_RNGP_PARENTREF_NOT_EMPTYZXML_RNGP_PARSE_ERRORZ#XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAMEZXML_RNGP_PAT_ATTR_ATTRZXML_RNGP_PAT_ATTR_ELEMZXML_RNGP_PAT_DATA_EXCEPT_ATTRZXML_RNGP_PAT_DATA_EXCEPT_ELEMZXML_RNGP_PAT_DATA_EXCEPT_EMPTYZXML_RNGP_PAT_DATA_EXCEPT_GROUPZ#XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVEZXML_RNGP_PAT_DATA_EXCEPT_LISTZ XML_RNGP_PAT_DATA_EXCEPT_ONEMOREZXML_RNGP_PAT_DATA_EXCEPT_REFZXML_RNGP_PAT_DATA_EXCEPT_TEXTZXML_RNGP_PAT_LIST_ATTRZXML_RNGP_PAT_LIST_ELEMZXML_RNGP_PAT_LIST_INTERLEAVEZXML_RNGP_PAT_LIST_LISTZXML_RNGP_PAT_LIST_REFZXML_RNGP_PAT_LIST_TEXTZ"XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAMEZ!XML_RNGP_PAT_NSNAME_EXCEPT_NSNAMEZXML_RNGP_PAT_ONEMORE_GROUP_ATTRZ$XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTRZXML_RNGP_PAT_START_ATTRZXML_RNGP_PAT_START_DATAZXML_RNGP_PAT_START_EMPTYZXML_RNGP_PAT_START_GROUPZXML_RNGP_PAT_START_INTERLEAVEZXML_RNGP_PAT_START_LISTZXML_RNGP_PAT_START_ONEMOREZXML_RNGP_PAT_START_TEXTZXML_RNGP_PAT_START_VALUEZXML_RNGP_PREFIX_UNDEFINEDZXML_RNGP_REF_CREATE_FAILEDZXML_RNGP_REF_CYCLEZXML_RNGP_REF_NAME_INVALIDZXML_RNGP_REF_NO_DEFZXML_RNGP_REF_NO_NAMEZXML_RNGP_REF_NOT_EMPTYZ$XML_RNGP_START_CHOICE_AND_INTERLEAVEZXML_RNGP_START_CONTENTZXML_RNGP_START_EMPTYZXML_RNGP_START_MISSINGZXML_RNGP_TEXT_EXPECTEDZXML_RNGP_TEXT_HAS_CHILDZXML_RNGP_TYPE_MISSINGZXML_RNGP_TYPE_NOT_FOUNDZXML_RNGP_TYPE_VALUEZXML_RNGP_UNKNOWN_ATTRIBUTEZXML_RNGP_UNKNOWN_COMBINEZXML_RNGP_UNKNOWN_CONSTRUCTZXML_RNGP_UNKNOWN_TYPE_LIBZXML_RNGP_URI_FRAGMENTZXML_RNGP_URI_NOT_ABSOLUTEZXML_RNGP_VALUE_EMPTYZXML_RNGP_VALUE_NO_CONTENTZXML_RNGP_XMLNS_NAMEZXML_RNGP_XML_NSZXML_XPATH_EXPRESSION_OKZXML_XPATH_NUMBER_ERRORZ"XML_XPATH_UNFINISHED_LITERAL_ERRORZXML_XPATH_START_LITERAL_ERRORZXML_XPATH_VARIABLE_REF_ERRORZXML_XPATH_UNDEF_VARIABLE_ERRORZ!XML_XPATH_INVALID_PREDICATE_ERRORZXML_XPATH_EXPR_ERRORZXML_XPATH_UNCLOSED_ERRORZXML_XPATH_UNKNOWN_FUNC_ERRORZXML_XPATH_INVALID_OPERANDZXML_XPATH_INVALID_TYPEZXML_XPATH_INVALID_ARITYZXML_XPATH_INVALID_CTXT_SIZEZXML_XPATH_INVALID_CTXT_POSITIONZXML_XPATH_MEMORY_ERRORZXML_XPTR_SYNTAX_ERRORZXML_XPTR_RESOURCE_ERRORZXML_XPTR_SUB_RESOURCE_ERRORZXML_XPATH_UNDEF_PREFIX_ERRORZXML_XPATH_ENCODING_ERRORZXML_XPATH_INVALID_CHAR_ERRORZXML_TREE_INVALID_HEXZXML_TREE_INVALID_DECZXML_TREE_UNTERMINATED_ENTITYZXML_TREE_NOT_UTF8ZXML_SAVE_NOT_UTF8ZXML_SAVE_CHAR_INVALIDZXML_SAVE_NO_DOCTYPEZXML_SAVE_UNKNOWN_ENCODINGZXML_REGEXP_COMPILE_ERRORZXML_IO_UNKNOWNZ XML_IO_EACCESZ XML_IO_EAGAINZ XML_IO_EBADFZXML_IO_EBADMSGZ XML_IO_EBUSYZXML_IO_ECANCELEDZ XML_IO_ECHILDZXML_IO_EDEADLKZ XML_IO_EDOMZ XML_IO_EEXISTZ XML_IO_EFAULTZ XML_IO_EFBIGZXML_IO_EINPROGRESSZ XML_IO_EINTRZ XML_IO_EINVALZ XML_IO_EIOZ XML_IO_EISDIRZ XML_IO_EMFILEZ XML_IO_EMLINKZXML_IO_EMSGSIZEZXML_IO_ENAMETOOLONGZ XML_IO_ENFILEZ XML_IO_ENODEVZ XML_IO_ENOENTZXML_IO_ENOEXECZ XML_IO_ENOLCKZ XML_IO_ENOMEMZ XML_IO_ENOSPCZ XML_IO_ENOSYSZXML_IO_ENOTDIRZXML_IO_ENOTEMPTYZXML_IO_ENOTSUPZ XML_IO_ENOTTYZ XML_IO_ENXIOZ XML_IO_EPERMZ XML_IO_EPIPEZ XML_IO_ERANGEZ XML_IO_EROFSZ XML_IO_ESPIPEZ XML_IO_ESRCHZXML_IO_ETIMEDOUTZ XML_IO_EXDEVZXML_IO_NETWORK_ATTEMPTZXML_IO_ENCODERZ XML_IO_FLUSHZ XML_IO_WRITEZXML_IO_NO_INPUTZXML_IO_BUFFER_FULLZXML_IO_LOAD_ERRORZXML_IO_ENOTSOCKZXML_IO_EISCONNZXML_IO_ECONNREFUSEDZXML_IO_ENETUNREACHZXML_IO_EADDRINUSEZXML_IO_EALREADYZXML_IO_EAFNOSUPPORTZXML_XINCLUDE_RECURSIONZXML_XINCLUDE_PARSE_VALUEZ XML_XINCLUDE_ENTITY_DEF_MISMATCHZXML_XINCLUDE_NO_HREFZXML_XINCLUDE_NO_FALLBACKZXML_XINCLUDE_HREF_URIZXML_XINCLUDE_TEXT_FRAGMENTZXML_XINCLUDE_TEXT_DOCUMENTZXML_XINCLUDE_INVALID_CHARZXML_XINCLUDE_BUILD_FAILEDZXML_XINCLUDE_UNKNOWN_ENCODINGZXML_XINCLUDE_MULTIPLE_ROOTZXML_XINCLUDE_XPTR_FAILEDZXML_XINCLUDE_XPTR_RESULTZXML_XINCLUDE_INCLUDE_IN_INCLUDEZ!XML_XINCLUDE_FALLBACKS_IN_INCLUDEZ$XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDEZXML_XINCLUDE_DEPRECATED_NSZXML_XINCLUDE_FRAGMENT_IDZXML_CATALOG_MISSING_ATTRZXML_CATALOG_ENTRY_BROKENZXML_CATALOG_PREFER_VALUEZXML_CATALOG_NOT_CATALOGZXML_CATALOG_RECURSIONZXML_SCHEMAP_PREFIX_UNDEFINEDZ!XML_SCHEMAP_ATTRFORMDEFAULT_VALUEZ XML_SCHEMAP_ATTRGRP_NONAME_NOREFZXML_SCHEMAP_ATTR_NONAME_NOREFZ$XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREFZ!XML_SCHEMAP_ELEMFORMDEFAULT_VALUEZXML_SCHEMAP_ELEM_NONAME_NOREFZXML_SCHEMAP_EXTENSION_NO_BASEZXML_SCHEMAP_FACET_NO_VALUEZXML_SCHEMAP_FAILED_BUILD_IMPORTZXML_SCHEMAP_GROUP_NONAME_NOREFZ$XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URIZ"XML_SCHEMAP_IMPORT_REDEFINE_NSNAMEZ!XML_SCHEMAP_IMPORT_SCHEMA_NOT_URIZXML_SCHEMAP_INVALID_BOOLEANZXML_SCHEMAP_INVALID_ENUMZXML_SCHEMAP_INVALID_FACETZXML_SCHEMAP_INVALID_FACET_VALUEZXML_SCHEMAP_INVALID_MAXOCCURSZXML_SCHEMAP_INVALID_MINOCCURSZ#XML_SCHEMAP_INVALID_REF_AND_SUBTYPEZXML_SCHEMAP_INVALID_WHITE_SPACEZXML_SCHEMAP_NOATTR_NOREFZXML_SCHEMAP_NOTATION_NO_NAMEZXML_SCHEMAP_NOTYPE_NOREFZXML_SCHEMAP_REF_AND_SUBTYPEZ$XML_SCHEMAP_RESTRICTION_NONAME_NOREFZXML_SCHEMAP_SIMPLETYPE_NONAMEZXML_SCHEMAP_TYPE_AND_SUBTYPEZXML_SCHEMAP_UNKNOWN_ALL_CHILDZ&XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILDZXML_SCHEMAP_UNKNOWN_ATTR_CHILDZ!XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILDZ#XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUPZXML_SCHEMAP_UNKNOWN_BASE_TYPEZ XML_SCHEMAP_UNKNOWN_CHOICE_CHILDZ(XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILDZ%XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILDZXML_SCHEMAP_UNKNOWN_ELEM_CHILDZ#XML_SCHEMAP_UNKNOWN_EXTENSION_CHILDZXML_SCHEMAP_UNKNOWN_FACET_CHILDZXML_SCHEMAP_UNKNOWN_FACET_TYPEZXML_SCHEMAP_UNKNOWN_GROUP_CHILDZ XML_SCHEMAP_UNKNOWN_IMPORT_CHILDZXML_SCHEMAP_UNKNOWN_LIST_CHILDZ"XML_SCHEMAP_UNKNOWN_NOTATION_CHILDZ(XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILDZXML_SCHEMAP_UNKNOWN_REFZ%XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILDZ!XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILDZ"XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILDZ'XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILDZ$XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILDZXML_SCHEMAP_UNKNOWN_TYPEZXML_SCHEMAP_UNKNOWN_UNION_CHILDZXML_SCHEMAP_ELEM_DEFAULT_FIXEDZXML_SCHEMAP_REGEXP_INVALIDZXML_SCHEMAP_FAILED_LOADZXML_SCHEMAP_NOTHING_TO_PARSEZXML_SCHEMAP_NOROOTZXML_SCHEMAP_REDEFINED_GROUPZXML_SCHEMAP_REDEFINED_TYPEZXML_SCHEMAP_REDEFINED_ELEMENTZXML_SCHEMAP_REDEFINED_ATTRGROUPZXML_SCHEMAP_REDEFINED_ATTRZXML_SCHEMAP_REDEFINED_NOTATIONZXML_SCHEMAP_FAILED_PARSEZXML_SCHEMAP_UNKNOWN_PREFIXZXML_SCHEMAP_DEF_AND_PREFIXZ!XML_SCHEMAP_UNKNOWN_INCLUDE_CHILDZ"XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URIZ!XML_SCHEMAP_INCLUDE_SCHEMA_NO_URIZXML_SCHEMAP_NOT_SCHEMAZXML_SCHEMAP_UNKNOWN_MEMBER_TYPEZXML_SCHEMAP_INVALID_ATTR_USEZXML_SCHEMAP_RECURSIVEZ(XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPEZ$XML_SCHEMAP_INVALID_ATTR_COMBINATIONZ+XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATIONZ$XML_SCHEMAP_MISSING_SIMPLETYPE_CHILDZXML_SCHEMAP_INVALID_ATTR_NAMEZXML_SCHEMAP_REF_AND_CONTENTZXML_SCHEMAP_CT_PROPS_CORRECT_1ZXML_SCHEMAP_CT_PROPS_CORRECT_2ZXML_SCHEMAP_CT_PROPS_CORRECT_3ZXML_SCHEMAP_CT_PROPS_CORRECT_4ZXML_SCHEMAP_CT_PROPS_CORRECT_5Z'XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1Z+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1Z+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2Z)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2Z'XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3Z&XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBERZ(XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLEZ!XML_SCHEMAP_UNION_NOT_EXPRESSIBLEZXML_SCHEMAP_SRC_IMPORT_3_1ZXML_SCHEMAP_SRC_IMPORT_3_2Z)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1Z)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2Z)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3ZXML_SCHEMAP_COS_CT_EXTENDS_1_3ZXML_SCHEMAV_NOROOTZXML_SCHEMAV_UNDECLAREDELEMZXML_SCHEMAV_NOTTOPLEVELZXML_SCHEMAV_MISSINGZXML_SCHEMAV_WRONGELEMZXML_SCHEMAV_NOTYPEZXML_SCHEMAV_NOROLLBACKZXML_SCHEMAV_ISABSTRACTZXML_SCHEMAV_NOTEMPTYZXML_SCHEMAV_ELEMCONTZXML_SCHEMAV_HAVEDEFAULTZXML_SCHEMAV_NOTNILLABLEZXML_SCHEMAV_EXTRACONTENTZXML_SCHEMAV_INVALIDATTRZXML_SCHEMAV_INVALIDELEMZXML_SCHEMAV_NOTDETERMINISTZXML_SCHEMAV_CONSTRUCTZXML_SCHEMAV_INTERNALZXML_SCHEMAV_NOTSIMPLEZXML_SCHEMAV_ATTRUNKNOWNZXML_SCHEMAV_ATTRINVALIDZXML_SCHEMAV_VALUEZXML_SCHEMAV_FACETZ$XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1Z$XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2Z$XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3ZXML_SCHEMAV_CVC_TYPE_3_1_1ZXML_SCHEMAV_CVC_TYPE_3_1_2ZXML_SCHEMAV_CVC_FACET_VALIDZXML_SCHEMAV_CVC_LENGTH_VALIDZXML_SCHEMAV_CVC_MINLENGTH_VALIDZXML_SCHEMAV_CVC_MAXLENGTH_VALIDZ"XML_SCHEMAV_CVC_MININCLUSIVE_VALIDZ"XML_SCHEMAV_CVC_MAXINCLUSIVE_VALIDZ"XML_SCHEMAV_CVC_MINEXCLUSIVE_VALIDZ"XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALIDZ!XML_SCHEMAV_CVC_TOTALDIGITS_VALIDZ$XML_SCHEMAV_CVC_FRACTIONDIGITS_VALIDZXML_SCHEMAV_CVC_PATTERN_VALIDZ!XML_SCHEMAV_CVC_ENUMERATION_VALIDZ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1Z XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2Z XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3Z XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4ZXML_SCHEMAV_CVC_ELT_1ZXML_SCHEMAV_CVC_ELT_2ZXML_SCHEMAV_CVC_ELT_3_1ZXML_SCHEMAV_CVC_ELT_3_2_1ZXML_SCHEMAV_CVC_ELT_3_2_2ZXML_SCHEMAV_CVC_ELT_4_1ZXML_SCHEMAV_CVC_ELT_4_2ZXML_SCHEMAV_CVC_ELT_4_3ZXML_SCHEMAV_CVC_ELT_5_1_1ZXML_SCHEMAV_CVC_ELT_5_1_2ZXML_SCHEMAV_CVC_ELT_5_2_1ZXML_SCHEMAV_CVC_ELT_5_2_2_1ZXML_SCHEMAV_CVC_ELT_5_2_2_2_1ZXML_SCHEMAV_CVC_ELT_5_2_2_2_2ZXML_SCHEMAV_CVC_ELT_6ZXML_SCHEMAV_CVC_ELT_7ZXML_SCHEMAV_CVC_ATTRIBUTE_1ZXML_SCHEMAV_CVC_ATTRIBUTE_2ZXML_SCHEMAV_CVC_ATTRIBUTE_3ZXML_SCHEMAV_CVC_ATTRIBUTE_4Z XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1Z"XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1Z"XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2ZXML_SCHEMAV_CVC_COMPLEX_TYPE_4Z XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1Z XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2ZXML_SCHEMAV_ELEMENT_CONTENTZ$XML_SCHEMAV_DOCUMENT_ELEMENT_MISSINGZXML_SCHEMAV_CVC_COMPLEX_TYPE_1ZXML_SCHEMAV_CVC_AUZXML_SCHEMAV_CVC_TYPE_1ZXML_SCHEMAV_CVC_TYPE_2ZXML_SCHEMAV_CVC_IDCZXML_SCHEMAV_CVC_WILDCARDZXML_SCHEMAV_MISCZXML_XPTR_UNKNOWN_SCHEMEZXML_XPTR_CHILDSEQ_STARTZXML_XPTR_EVAL_FAILEDZXML_XPTR_EXTRA_OBJECTSZXML_C14N_CREATE_CTXTZXML_C14N_REQUIRES_UTF8ZXML_C14N_CREATE_STACKZXML_C14N_INVALID_NODEZXML_C14N_UNKNOW_NODEZXML_C14N_RELATIVE_NAMESPACEZXML_FTP_PASV_ANSWERZXML_FTP_EPSV_ANSWERZ XML_FTP_ACCNTZXML_FTP_URL_SYNTAXZXML_HTTP_URL_SYNTAXZXML_HTTP_USE_IPZXML_HTTP_UNKNOWN_HOSTZXML_SCHEMAP_SRC_SIMPLE_TYPE_1ZXML_SCHEMAP_SRC_SIMPLE_TYPE_2ZXML_SCHEMAP_SRC_SIMPLE_TYPE_3ZXML_SCHEMAP_SRC_SIMPLE_TYPE_4ZXML_SCHEMAP_SRC_RESOLVEZ.XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPEZ+XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPEZ0XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPESZXML_SCHEMAP_ST_PROPS_CORRECT_1ZXML_SCHEMAP_ST_PROPS_CORRECT_2ZXML_SCHEMAP_ST_PROPS_CORRECT_3Z XML_SCHEMAP_COS_ST_RESTRICTS_1_1Z XML_SCHEMAP_COS_ST_RESTRICTS_1_2Z"XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1Z"XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2Z XML_SCHEMAP_COS_ST_RESTRICTS_2_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5Z XML_SCHEMAP_COS_ST_RESTRICTS_3_1Z"XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5Z!XML_SCHEMAP_COS_ST_DERIVED_OK_2_1Z!XML_SCHEMAP_COS_ST_DERIVED_OK_2_2Z XML_SCHEMAP_S4S_ELEM_NOT_ALLOWEDZXML_SCHEMAP_S4S_ELEM_MISSINGZ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWEDZXML_SCHEMAP_S4S_ATTR_MISSINGZ"XML_SCHEMAP_S4S_ATTR_INVALID_VALUEZXML_SCHEMAP_SRC_ELEMENT_1ZXML_SCHEMAP_SRC_ELEMENT_2_1ZXML_SCHEMAP_SRC_ELEMENT_2_2ZXML_SCHEMAP_SRC_ELEMENT_3ZXML_SCHEMAP_P_PROPS_CORRECT_1ZXML_SCHEMAP_P_PROPS_CORRECT_2_1ZXML_SCHEMAP_P_PROPS_CORRECT_2_2ZXML_SCHEMAP_E_PROPS_CORRECT_2ZXML_SCHEMAP_E_PROPS_CORRECT_3ZXML_SCHEMAP_E_PROPS_CORRECT_4ZXML_SCHEMAP_E_PROPS_CORRECT_5ZXML_SCHEMAP_E_PROPS_CORRECT_6ZXML_SCHEMAP_SRC_INCLUDEZXML_SCHEMAP_SRC_ATTRIBUTE_1ZXML_SCHEMAP_SRC_ATTRIBUTE_2ZXML_SCHEMAP_SRC_ATTRIBUTE_3_1ZXML_SCHEMAP_SRC_ATTRIBUTE_3_2ZXML_SCHEMAP_SRC_ATTRIBUTE_4ZXML_SCHEMAP_NO_XMLNSZXML_SCHEMAP_NO_XSIZXML_SCHEMAP_COS_VALID_DEFAULT_1Z!XML_SCHEMAP_COS_VALID_DEFAULT_2_1Z#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1Z#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2ZXML_SCHEMAP_CVC_SIMPLE_TYPEZXML_SCHEMAP_COS_CT_EXTENDS_1_1ZXML_SCHEMAP_SRC_IMPORT_1_1ZXML_SCHEMAP_SRC_IMPORT_1_2ZXML_SCHEMAP_SRC_IMPORT_2ZXML_SCHEMAP_SRC_IMPORT_2_1ZXML_SCHEMAP_SRC_IMPORT_2_2ZXML_SCHEMAP_INTERNALZXML_SCHEMAP_NOT_DETERMINISTICZ!XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1Z!XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2Z!XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3ZXML_SCHEMAP_MG_PROPS_CORRECT_1ZXML_SCHEMAP_MG_PROPS_CORRECT_2ZXML_SCHEMAP_SRC_CT_1Z+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3ZXML_SCHEMAP_AU_PROPS_CORRECT_2ZXML_SCHEMAP_A_PROPS_CORRECT_2ZXML_SCHEMAP_C_PROPS_CORRECTZXML_SCHEMAP_SRC_REDEFINEZXML_SCHEMAP_SRC_IMPORTZXML_SCHEMAP_WARN_SKIP_SCHEMAZ!XML_SCHEMAP_WARN_UNLOCATED_SCHEMAZ!XML_SCHEMAP_WARN_ATTR_REDECL_PROHZ$XML_SCHEMAP_WARN_ATTR_POINTLESS_PROHZXML_SCHEMAP_AG_PROPS_CORRECTZXML_SCHEMAP_COS_CT_EXTENDS_1_2ZXML_SCHEMAP_AU_PROPS_CORRECTZXML_SCHEMAP_A_PROPS_CORRECT_3ZXML_SCHEMAP_COS_ALL_LIMITEDZXML_SCHEMATRONV_ASSERTZXML_SCHEMATRONV_REPORTZXML_MODULE_OPENZXML_MODULE_CLOSEZXML_CHECK_FOUND_ELEMENTZXML_CHECK_FOUND_ATTRIBUTEZXML_CHECK_FOUND_TEXTZXML_CHECK_FOUND_CDATAZXML_CHECK_FOUND_ENTITYREFZXML_CHECK_FOUND_ENTITYZXML_CHECK_FOUND_PIZXML_CHECK_FOUND_COMMENTZXML_CHECK_FOUND_DOCTYPEZXML_CHECK_FOUND_FRAGMENTZXML_CHECK_FOUND_NOTATIONZXML_CHECK_UNKNOWN_NODEZXML_CHECK_ENTITY_TYPEZXML_CHECK_NO_PARENTZXML_CHECK_NO_DOCZXML_CHECK_NO_NAMEZXML_CHECK_NO_ELEMZXML_CHECK_WRONG_DOCZXML_CHECK_NO_PREVZXML_CHECK_WRONG_PREVZXML_CHECK_NO_NEXTZXML_CHECK_WRONG_NEXTZXML_CHECK_NOT_DTDZXML_CHECK_NOT_ATTRZXML_CHECK_NOT_ATTR_DECLZXML_CHECK_NOT_ELEM_DECLZXML_CHECK_NOT_ENTITY_DECLZXML_CHECK_NOT_NS_DECLZXML_CHECK_NO_HREFZXML_CHECK_WRONG_PARENTZXML_CHECK_NS_SCOPEZXML_CHECK_NS_ANCESTORZXML_CHECK_NOT_UTF8ZXML_CHECK_NO_DICTZXML_CHECK_NOT_NCNAMEZXML_CHECK_OUTSIDE_DICTZXML_CHECK_WRONG_NAMEZXML_CHECK_NAME_NOT_NULLZXML_I18N_NO_NAMEZXML_I18N_NO_HANDLERZXML_I18N_EXCESS_HANDLERZXML_I18N_CONV_FAILEDZXML_I18N_NO_OUTPUTZXML_BUF_OVERFLOWZ XML_C14N_1_0ZXML_C14N_EXCLUSIVE_1_0Z XML_C14N_1_1ZXML_CATA_ALLOW_NONEZXML_CATA_ALLOW_GLOBALZXML_CATA_ALLOW_DOCUMENTZXML_CATA_ALLOW_ALLZXML_CATA_PREFER_NONEZXML_CATA_PREFER_PUBLICZXML_CATA_PREFER_SYSTEMZXML_CHAR_ENCODING_ERRORZXML_CHAR_ENCODING_NONEZXML_CHAR_ENCODING_UTF8ZXML_CHAR_ENCODING_UTF16LEZXML_CHAR_ENCODING_UTF16BEZXML_CHAR_ENCODING_UCS4LEZXML_CHAR_ENCODING_UCS4BEZXML_CHAR_ENCODING_EBCDICZXML_CHAR_ENCODING_UCS4_2143ZXML_CHAR_ENCODING_UCS4_3412ZXML_CHAR_ENCODING_UCS2ZXML_CHAR_ENCODING_8859_1ZXML_CHAR_ENCODING_8859_2ZXML_CHAR_ENCODING_8859_3ZXML_CHAR_ENCODING_8859_4ZXML_CHAR_ENCODING_8859_5ZXML_CHAR_ENCODING_8859_6ZXML_CHAR_ENCODING_8859_7ZXML_CHAR_ENCODING_8859_8ZXML_CHAR_ENCODING_8859_9ZXML_CHAR_ENCODING_2022_JPZXML_CHAR_ENCODING_SHIFT_JISZXML_CHAR_ENCODING_EUC_JPZXML_CHAR_ENCODING_ASCIIZXML_DOC_WELLFORMEDZXML_DOC_NSVALIDZ XML_DOC_OLD10ZXML_DOC_DTDVALIDZXML_DOC_XINCLUDEZXML_DOC_USERBUILTZXML_DOC_INTERNALZ XML_DOC_HTMLZXML_ELEMENT_CONTENT_PCDATAZXML_ELEMENT_CONTENT_ELEMENTZXML_ELEMENT_CONTENT_SEQZXML_ELEMENT_CONTENT_ORZXML_ELEMENT_CONTENT_ONCEZXML_ELEMENT_CONTENT_OPTZXML_ELEMENT_CONTENT_MULTZXML_ELEMENT_CONTENT_PLUSZXML_ELEMENT_TYPE_UNDEFINEDZXML_ELEMENT_TYPE_EMPTYZXML_ELEMENT_TYPE_ANYZXML_ELEMENT_TYPE_MIXEDZXML_ELEMENT_TYPE_ELEMENTZXML_ENC_ERR_MEMORYZXML_ENC_ERR_INTERNALZXML_ENC_ERR_PARTIALZXML_ENC_ERR_INPUTZXML_ENC_ERR_SPACEZXML_ENC_ERR_SUCCESSZ XML_ERR_NONEZXML_ERR_WARNINGZ XML_ERR_ERRORZ XML_ERR_FATALZ XML_EXP_EMPTYZXML_EXP_FORBIDZ XML_EXP_ATOMZ XML_EXP_SEQZ XML_EXP_ORZ XML_EXP_COUNTZXML_INTERNAL_GENERAL_ENTITYZ"XML_EXTERNAL_GENERAL_PARSED_ENTITYZ$XML_EXTERNAL_GENERAL_UNPARSED_ENTITYZXML_INTERNAL_PARAMETER_ENTITYZXML_EXTERNAL_PARAMETER_ENTITYZXML_INTERNAL_PREDEFINED_ENTITYZ XML_FROM_NONEZXML_FROM_PARSERZ XML_FROM_TREEZXML_FROM_NAMESPACEZ XML_FROM_DTDZ XML_FROM_HTMLZXML_FROM_MEMORYZXML_FROM_OUTPUTZ XML_FROM_IOZ XML_FROM_FTPZ XML_FROM_HTTPZXML_FROM_XINCLUDEZXML_FROM_XPATHZXML_FROM_XPOINTERZXML_FROM_REGEXPZXML_FROM_DATATYPEZXML_FROM_SCHEMASPZXML_FROM_SCHEMASVZXML_FROM_RELAXNGPZXML_FROM_RELAXNGVZXML_FROM_CATALOGZ XML_FROM_C14NZ XML_FROM_XSLTZXML_FROM_VALIDZXML_FROM_CHECKZXML_FROM_WRITERZXML_FROM_MODULEZ XML_FROM_I18NZXML_FROM_SCHEMATRONVZXML_FROM_BUFFERZ XML_FROM_URIZXML_MODULE_LAZYZXML_MODULE_LOCALZXML_PARSER_EOFZXML_PARSER_STARTZXML_PARSER_MISCZ XML_PARSER_PIZXML_PARSER_DTDZXML_PARSER_PROLOGZXML_PARSER_COMMENTZXML_PARSER_START_TAGZXML_PARSER_CONTENTZXML_PARSER_CDATA_SECTIONZXML_PARSER_END_TAGZXML_PARSER_ENTITY_DECLZXML_PARSER_ENTITY_VALUEZXML_PARSER_ATTRIBUTE_VALUEZXML_PARSER_SYSTEM_LITERALZXML_PARSER_EPILOGZXML_PARSER_IGNOREZXML_PARSER_PUBLIC_LITERALZXML_PARSER_XML_DECLZXML_PARSER_LOADDTDZXML_PARSER_DEFAULTATTRSZXML_PARSER_VALIDATEZXML_PARSER_SUBST_ENTITIESZ$XML_PARSER_SEVERITY_VALIDITY_WARNINGZ"XML_PARSER_SEVERITY_VALIDITY_ERRORZXML_PARSER_SEVERITY_WARNINGZXML_PARSER_SEVERITY_ERRORZXML_PARSE_RECOVERZXML_PARSE_NOENTZXML_PARSE_DTDLOADZXML_PARSE_DTDATTRZXML_PARSE_DTDVALIDZXML_PARSE_NOERRORZXML_PARSE_NOWARNINGZXML_PARSE_PEDANTICZXML_PARSE_NOBLANKSZXML_PARSE_SAX1ZXML_PARSE_XINCLUDEZXML_PARSE_NONETZXML_PARSE_NODICTZXML_PARSE_NSCLEANZXML_PARSE_NOCDATAZXML_PARSE_NOXINCNODEZXML_PARSE_COMPACTZXML_PARSE_OLD10ZXML_PARSE_NOBASEFIXZXML_PARSE_HUGEZXML_PARSE_OLDSAXZXML_PARSE_IGNORE_ENCZXML_PARSE_BIG_LINESZXML_PARSE_UNKNOWNZ XML_PARSE_DOMZ XML_PARSE_SAXZXML_PARSE_PUSH_DOMZXML_PARSE_PUSH_SAXZXML_PARSE_READERZXML_PATTERN_DEFAULTZXML_PATTERN_XPATHZXML_PATTERN_XSSELZXML_PATTERN_XSFIELDZXML_READER_TYPE_NONEZXML_READER_TYPE_ELEMENTZXML_READER_TYPE_ATTRIBUTEZXML_READER_TYPE_TEXTZXML_READER_TYPE_CDATAZ XML_READER_TYPE_ENTITY_REFERENCEZXML_READER_TYPE_ENTITYZ&XML_READER_TYPE_PROCESSING_INSTRUCTIONZXML_READER_TYPE_COMMENTZXML_READER_TYPE_DOCUMENTZXML_READER_TYPE_DOCUMENT_TYPEZ!XML_READER_TYPE_DOCUMENT_FRAGMENTZXML_READER_TYPE_NOTATIONZXML_READER_TYPE_WHITESPACEZ&XML_READER_TYPE_SIGNIFICANT_WHITESPACEZXML_READER_TYPE_END_ELEMENTZXML_READER_TYPE_END_ENTITYZXML_READER_TYPE_XML_DECLARATIONZXML_RELAXNGP_NONEZXML_RELAXNGP_FREE_DOCZXML_RELAXNGP_CRNGZXML_RELAXNG_OKZXML_RELAXNG_ERR_MEMORYZXML_RELAXNG_ERR_TYPEZXML_RELAXNG_ERR_TYPEVALZXML_RELAXNG_ERR_DUPIDZXML_RELAXNG_ERR_TYPECMPZXML_RELAXNG_ERR_NOSTATEZXML_RELAXNG_ERR_NODEFINEZXML_RELAXNG_ERR_LISTEXTRAZXML_RELAXNG_ERR_LISTEMPTYZXML_RELAXNG_ERR_INTERNODATAZXML_RELAXNG_ERR_INTERSEQZXML_RELAXNG_ERR_INTEREXTRAZXML_RELAXNG_ERR_ELEMNAMEZXML_RELAXNG_ERR_ATTRNAMEZXML_RELAXNG_ERR_ELEMNONSZXML_RELAXNG_ERR_ATTRNONSZXML_RELAXNG_ERR_ELEMWRONGNSZXML_RELAXNG_ERR_ATTRWRONGNSZXML_RELAXNG_ERR_ELEMEXTRANSZXML_RELAXNG_ERR_ATTREXTRANSZXML_RELAXNG_ERR_ELEMNOTEMPTYZXML_RELAXNG_ERR_NOELEMZXML_RELAXNG_ERR_NOTELEMZXML_RELAXNG_ERR_ATTRVALIDZXML_RELAXNG_ERR_CONTENTVALIDZXML_RELAXNG_ERR_EXTRACONTENTZXML_RELAXNG_ERR_INVALIDATTRZXML_RELAXNG_ERR_DATAELEMZXML_RELAXNG_ERR_VALELEMZXML_RELAXNG_ERR_LISTELEMZXML_RELAXNG_ERR_DATATYPEZXML_RELAXNG_ERR_VALUEZXML_RELAXNG_ERR_LISTZXML_RELAXNG_ERR_NOGRAMMARZXML_RELAXNG_ERR_EXTRADATAZXML_RELAXNG_ERR_LACKDATAZXML_RELAXNG_ERR_INTERNALZXML_RELAXNG_ERR_ELEMWRONGZXML_RELAXNG_ERR_TEXTWRONGZXML_SAVE_FORMATZXML_SAVE_NO_DECLZXML_SAVE_NO_EMPTYZXML_SAVE_NO_XHTMLZXML_SAVE_XHTMLZXML_SAVE_AS_XMLZXML_SAVE_AS_HTMLZXML_SAVE_WSNONSIGZXML_SCHEMAS_UNKNOWNZXML_SCHEMAS_STRINGZXML_SCHEMAS_NORMSTRINGZXML_SCHEMAS_DECIMALZXML_SCHEMAS_TIMEZXML_SCHEMAS_GDAYZXML_SCHEMAS_GMONTHZXML_SCHEMAS_GMONTHDAYZXML_SCHEMAS_GYEARZXML_SCHEMAS_GYEARMONTHZXML_SCHEMAS_DATEZXML_SCHEMAS_DATETIMEZXML_SCHEMAS_DURATIONZXML_SCHEMAS_FLOATZXML_SCHEMAS_DOUBLEZXML_SCHEMAS_BOOLEANZXML_SCHEMAS_TOKENZXML_SCHEMAS_LANGUAGEZXML_SCHEMAS_NMTOKENZXML_SCHEMAS_NMTOKENSZXML_SCHEMAS_NAMEZXML_SCHEMAS_QNAMEZXML_SCHEMAS_NCNAMEZXML_SCHEMAS_IDZXML_SCHEMAS_IDREFZXML_SCHEMAS_IDREFSZXML_SCHEMAS_ENTITYZXML_SCHEMAS_ENTITIESZXML_SCHEMAS_NOTATIONZXML_SCHEMAS_ANYURIZXML_SCHEMAS_INTEGERZXML_SCHEMAS_NPINTEGERZXML_SCHEMAS_NINTEGERZXML_SCHEMAS_NNINTEGERZXML_SCHEMAS_PINTEGERZXML_SCHEMAS_INTZXML_SCHEMAS_UINTZXML_SCHEMAS_LONGZXML_SCHEMAS_ULONGZXML_SCHEMAS_SHORTZXML_SCHEMAS_USHORTZXML_SCHEMAS_BYTEZXML_SCHEMAS_UBYTEZXML_SCHEMAS_HEXBINARYZXML_SCHEMAS_BASE64BINARYZXML_SCHEMAS_ANYTYPEZXML_SCHEMAS_ANYSIMPLETYPEZXML_SCHEMAS_ERR_OKZXML_SCHEMAS_ERR_NOROOTZXML_SCHEMAS_ERR_UNDECLAREDELEMZXML_SCHEMAS_ERR_NOTTOPLEVELZXML_SCHEMAS_ERR_MISSINGZXML_SCHEMAS_ERR_WRONGELEMZXML_SCHEMAS_ERR_NOTYPEZXML_SCHEMAS_ERR_NOROLLBACKZXML_SCHEMAS_ERR_ISABSTRACTZXML_SCHEMAS_ERR_NOTEMPTYZXML_SCHEMAS_ERR_ELEMCONTZXML_SCHEMAS_ERR_HAVEDEFAULTZXML_SCHEMAS_ERR_NOTNILLABLEZXML_SCHEMAS_ERR_EXTRACONTENTZXML_SCHEMAS_ERR_INVALIDATTRZXML_SCHEMAS_ERR_INVALIDELEMZXML_SCHEMAS_ERR_NOTDETERMINISTZXML_SCHEMAS_ERR_CONSTRUCTZXML_SCHEMAS_ERR_INTERNALZXML_SCHEMAS_ERR_NOTSIMPLEZXML_SCHEMAS_ERR_ATTRUNKNOWNZXML_SCHEMAS_ERR_ATTRINVALIDZXML_SCHEMAS_ERR_VALUEZXML_SCHEMAS_ERR_FACETZXML_SCHEMAS_ERR_ZXML_SCHEMAS_ERR_XXXZXML_SCHEMATRON_OUT_QUIETZXML_SCHEMATRON_OUT_TEXTZXML_SCHEMATRON_OUT_XMLZXML_SCHEMATRON_OUT_ERRORZXML_SCHEMATRON_OUT_FILEZXML_SCHEMATRON_OUT_BUFFERZXML_SCHEMATRON_OUT_IOZXML_SCHEMA_CONTENT_UNKNOWNZXML_SCHEMA_CONTENT_EMPTYZXML_SCHEMA_CONTENT_ELEMENTSZXML_SCHEMA_CONTENT_MIXEDZXML_SCHEMA_CONTENT_SIMPLEZ$XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTSZXML_SCHEMA_CONTENT_BASICZXML_SCHEMA_CONTENT_ANYZXML_SCHEMA_TYPE_BASICZXML_SCHEMA_TYPE_ANYZXML_SCHEMA_TYPE_FACETZXML_SCHEMA_TYPE_SIMPLEZXML_SCHEMA_TYPE_COMPLEXZXML_SCHEMA_TYPE_SEQUENCEZXML_SCHEMA_TYPE_CHOICEZXML_SCHEMA_TYPE_ALLZXML_SCHEMA_TYPE_SIMPLE_CONTENTZXML_SCHEMA_TYPE_COMPLEX_CONTENTZXML_SCHEMA_TYPE_URZXML_SCHEMA_TYPE_RESTRICTIONZXML_SCHEMA_TYPE_EXTENSIONZXML_SCHEMA_TYPE_ELEMENTZXML_SCHEMA_TYPE_ATTRIBUTEZXML_SCHEMA_TYPE_ATTRIBUTEGROUPZXML_SCHEMA_TYPE_GROUPZXML_SCHEMA_TYPE_NOTATIONZXML_SCHEMA_TYPE_LISTZXML_SCHEMA_TYPE_UNIONZXML_SCHEMA_TYPE_ANY_ATTRIBUTEZXML_SCHEMA_TYPE_IDC_UNIQUEZXML_SCHEMA_TYPE_IDC_KEYZXML_SCHEMA_TYPE_IDC_KEYREFZXML_SCHEMA_TYPE_PARTICLEZXML_SCHEMA_TYPE_ATTRIBUTE_USEZXML_SCHEMA_FACET_MININCLUSIVEZXML_SCHEMA_FACET_MINEXCLUSIVEZXML_SCHEMA_FACET_MAXINCLUSIVEZXML_SCHEMA_FACET_MAXEXCLUSIVEZXML_SCHEMA_FACET_TOTALDIGITSZXML_SCHEMA_FACET_FRACTIONDIGITSZXML_SCHEMA_FACET_PATTERNZXML_SCHEMA_FACET_ENUMERATIONZXML_SCHEMA_FACET_WHITESPACEZXML_SCHEMA_FACET_LENGTHZXML_SCHEMA_FACET_MAXLENGTHZXML_SCHEMA_FACET_MINLENGTHZXML_SCHEMA_EXTRA_QNAMEREFZ XML_SCHEMA_EXTRA_ATTR_USE_PROHIBZXML_SCHEMA_VAL_VC_I_CREATEZXML_SCHEMA_WHITESPACE_UNKNOWNZXML_SCHEMA_WHITESPACE_PRESERVEZXML_SCHEMA_WHITESPACE_REPLACEZXML_SCHEMA_WHITESPACE_COLLAPSEZXML_TEXTREADER_MODE_INITIALZXML_TEXTREADER_MODE_INTERACTIVEZXML_TEXTREADER_MODE_ERRORZXML_TEXTREADER_MODE_EOFZXML_TEXTREADER_MODE_CLOSEDZXML_TEXTREADER_MODE_READINGZXML_WITH_THREADZ XML_WITH_TREEZXML_WITH_OUTPUTZ XML_WITH_PUSHZXML_WITH_READERZXML_WITH_PATTERNZXML_WITH_WRITERZ XML_WITH_SAX1Z XML_WITH_FTPZ XML_WITH_HTTPZXML_WITH_VALIDZ XML_WITH_HTMLZXML_WITH_LEGACYZ XML_WITH_C14NZXML_WITH_CATALOGZXML_WITH_XPATHZ XML_WITH_XPTRZXML_WITH_XINCLUDEZXML_WITH_ICONVZXML_WITH_ISO8859XZXML_WITH_UNICODEZXML_WITH_REGEXPZXML_WITH_AUTOMATAZ XML_WITH_EXPRZXML_WITH_SCHEMASZXML_WITH_SCHEMATRONZXML_WITH_MODULESZXML_WITH_DEBUGZXML_WITH_DEBUG_MEMZXML_WITH_DEBUG_RUNZ XML_WITH_ZLIBZ XML_WITH_ICUZ XML_WITH_LZMAZ XML_WITH_NONEZXPATH_UNDEFINEDZ XPATH_NODESETZ XPATH_BOOLEANZ XPATH_NUMBERZ XPATH_STRINGZ XPATH_POINTZ XPATH_RANGEZXPATH_LOCATIONSETZ XPATH_USERSZXPATH_XSLT_TREEZXPATH_EXPRESSION_OKZXPATH_NUMBER_ERRORZXPATH_UNFINISHED_LITERAL_ERRORZXPATH_START_LITERAL_ERRORZXPATH_VARIABLE_REF_ERRORZXPATH_UNDEF_VARIABLE_ERRORZXPATH_INVALID_PREDICATE_ERRORZXPATH_EXPR_ERRORZXPATH_UNCLOSED_ERRORZXPATH_UNKNOWN_FUNC_ERRORZXPATH_INVALID_OPERANDZXPATH_INVALID_TYPEZXPATH_INVALID_ARITYZXPATH_INVALID_CTXT_SIZEZXPATH_INVALID_CTXT_POSITIONZXPATH_MEMORY_ERRORZXPTR_SYNTAX_ERRORZXPTR_RESOURCE_ERRORZXPTR_SUB_RESOURCE_ERRORZXPATH_UNDEF_PREFIX_ERRORZXPATH_ENCODING_ERRORZXPATH_INVALID_CHAR_ERRORZXPATH_INVALID_CTXTZXPATH_STACK_ERRORZXPATH_FORBID_VARIABLE_ERRORZXPATH_OP_LIMIT_EXCEEDEDZXPATH_RECURSION_LIMIT_EXCEEDEDrrrrsT   +/i   #                   #                                                                                                      E;,5O <B /b:.F*M;z0%E