o 69dH@s9ddlZddlZddlZGdddeZddZddZGdd 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 Zd d ZGd d d eZGdddeZGdddeZGdddeZGdddeZGdddZGdddeZGdddeZGdddeZGdddZGd d!d!eZGd"d#d#e ZGd$d%d%e ZGd&d'd'ZGd(d)d)ZGd*d+d+ZGd,d-d-e!ZGd.d/d/ZGd0d1d1ZGd2d3d3e ZGd4d5d5ZGd6d7d7e#ZGd8d9d9ZGd:d;d;eZGd<d=d=ZGd>d?d?ZdZd$Zd%Zd&ZdZd$Zd%Zd$Zd%Zd&Zd'Zd@ZdAZd$Zd%Zd&Zd'Zd$Zd%Zd&Zd'ZdZd$Zd%Zd&Zd'ZÐd@ZĐdAZŐdBZƐdCZǐdDZȐdEZɐdFZʐdGZːdHZ̐dIZ͐dJZΐdKZϐdLZАdMZѐdNZҐdOZӐdPZԐdQZՐdRZ֐dSZאdTZؐdUZِdVZڐdWZېdXZܐdYZݐdZZސd[Zߐd\Zd]Zd^Zd_Zd`ZdaZdbZdcZddZdeZdfZdgZdhZdiZdjZdZd$Zd%Zd&Zd'Zd@ZdAZdBZdCZdDZdEZdFZdGZdHZdIZdJZdKZd$Zd%Zd&Zd'Zd@ZdAZd$Zd%Zd'ZdCZ dKZ d[Z dkZ dlZ dZd$Zd%Zd'ZdZd$Zd%Zd&Zd'Zd@ZdAZdBZdCZdDZdEZdFZdGZdHZdIZ dJZ!dKZ"dLZ#dMZ$dNZ%dOZ&dPZ'dQZ(dRZ)dSZ*dTZ+dUZ,dVZ-dWZ.dXZ/dYZ0dZZ1d[Z2d\Z3d]Z4d^Z5d_Z6d`Z7daZ8dbZ9dcZ:ddZ;deZ<dfZ=dgZ>dhZ?diZ@dmZAdnZBdoZCdpZDdqZEdrZFdsZGdtZHduZIdvZJdwZKdxZLdyZMdzZNd{ZOd|ZPd}ZQdkZRd~ZSdZTdZUdZVdZWdZXdZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbdZcdZddZedZfdZgdZhdZidZjdZkdZldZmdZndZodZpdZqdZrdZsdZtdZudZvdZwdZxdZydZzdZ{dZ|dZ}dZ~dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdÐZdĐZdŐZdƐZdǐZdȐZdɐZdʐZdːZd̐Zd͐ZdΐZdϐZdАZdѐZdҐZdӐZdԐZdՐZd֐ZdאZdؐZdِZdڐZdېZdܐZdݐZdސZdߐZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZÐdZĐdZŐdZƐdZǐdZȐdZɐdZʐdZːdZ̐dZ͐dZΐdZϐdZАdZѐdZҐdZӐdZԐdZՐdZ֐dZאdZؐdZِdZڐdZېdZܐdZݐd Zސd Zߐd Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Zd!Zd"Zd#Zd$Zd%Zd&Zd'Zd(Zd)Zd*Zd+Zd,Zd-Zd.Zd/Zd0Zd1Zd2Zd3Zd4Z d5Z d6Z d7Z d8Z d9Zd:Zd;Zd<Zd=Zd>Zd?Zd@ZdAZdBZdCZdDZdEZdFZdGZdHZdIZdJZdKZ dLZ!dMZ"dNZ#dOZ$dPZ%dQZ&dRZ'dSZ(dTZ)dUZ*dVZ+dWZ,dXZ-dYZ.dZZ/d[Z0d\Z1d]Z2d^Z3d_Z4d`Z5daZ6dbZ7dcZ8ddZ9deZ:dfZ;dgZ<dhZ=diZ>djZ?dkZ@dlZAdmZBdnZCdoZDdpZEdqZFdrZGdsZHdtZIduZJdvZKdwZLdxZMdyZNdzZOd{ZPd|ZQd}ZRd~ZSdZTdZUdZVdZWdZXdZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbdZcdZddZedZfdZgdZhdZidZjdZkdZldZmdZndZodZpdZqdZrdZsdZtdZudZvdZwdZxdZydZzdZ{dZ|dZ}dZ~dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdÐZdĐZdŐZdƐZdǐZdȐZdɐZdʐZdːZd̐Zd͐ZdΐZdϐZdАZdѐZdҐZdӐZdԐZdՐZd֐ZdאZdؐZdِZdڐZdېZdܐZdݐZdސZdߐZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZÐdZĐdZŐdZƐdZǐdZȐdZɐdZʐdZːdZ̐dZ͐dZΐdZϐdZАdZѐdZҐdZӐdZԐdZՐdZ֐dZאdZؐdZِdZڐdZېdZܐdZݐd Zސd Zߐd Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Zd!Zd"Zd#Zd$Zd%Zd&Zd'Zd(Zd)Zd*Zd+Zd,Zd-Zd.Zd/Zd0Zd1Zd2Zd3Zd4Z d5Z d6Z d7Z d8Z d9Zd:Zd;Zd<Zd=Zd>Zd?Zd@ZdAZdBZdCZdDZdEZdFZdGZdHZdIZdJZdKZ dLZ!dMZ"dNZ#dOZ$dPZ%dQZ&dRZ'dSZ(dTZ)dUZ*dVZ+dWZ,dXZ-dYZ.dZZ/d[Z0d\Z1d]Z2d^Z3d_Z4d`Z5daZ6dbZ7dcZ8ddZ9deZ:dfZ;dgZ<dhZ=diZ>djZ?dkZ@dlZAdmZBdnZCdoZDdpZEdqZFdrZGdsZHdtZIduZJdvZKdwZLdxZMdyZNdzZOd{ZPd|ZQd}ZRd~ZSdZTdZUdZVdZWdZXdZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbdZcdZddZedZfdZgdZhdZidZjdZkdZldZmdZndZodZpdZqdZrdZsdZtdZudZvdZwdZxdZydZzdZ{dZ|dZ}dZ~dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdÐZdĐZdŐZdƐZdǐZdȐZdɐZdʐZdːZd̐Zd͐ZdΐZdϐZdАZdѐZdҐZdӐZdԐZdՐZd֐ZdאZdؐZdِZdڐZdېZdܐZdݐZdސZdߐZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZÐdZĐdZŐdZƐdZǐdZȐdZɐdZʐdZːdZ̐dZ͐dZΐdZϐdZАdZѐdZҐdZӐdZԐdZՐdZ֐dZאdZؐdZِdZڐdZېdZܐdZݐd Zސd Zߐd Zd Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd$Zd%Zd&Zd'Zd@Zd$Zd%Zd&Zd'Zd$Zd%Zd&Zd'ZdZd$Zd%Zd&Zd'Zd@ZdAZdBZdCZdDZdEZdFZ dGZ dHZ dIZ dJZ dKZdLZdZd$Zd%Zd$Zd%Zd&Zd'Zd@ZdAZdBZdCZdDZdEZdFZdGZdHZdIZ dJZ!dKZ"dLZ#dMZ$dNZ%dOZ&dPZ'dZ(d$Z)d%Z*d$Z+d%Z,d&Z-d'Z.d@Z/dAZ0dBZ1dCZ2dDZ3dEZ4dFZ5dGZ6dHZ7dIZ8dJZ9dKZ:dLZ;dMZ<dNZ=dOZ>dPZ?dQZ@dRZAdSZBdTZCdUZDdVZEdWZFdXZGdYZHdZZId[ZJd\ZKdZLd$ZMd%ZNd&ZOd'ZPdZQd$ZRd%ZSd&ZTd'ZUd@ZVdAZWdBZXdCZYdDZZdEZ[dFZ\dGZ]dHZ^dIZ_dJZ`dKZadLZbdMZcdNZddOZedPZfdQZgdRZhdSZidTZjdUZkdZld$Zmd%Znd&Zod'Zpd@ZqdZrd$Zsd%Ztd&ZudjZvdZwd$Zxd%Zyd&Zzd'Z{d@Z|dAZ}dBZ~dCZdDZdEZdFZdGZdHZdIZdJZdKZdLZdMZdNZdOZdPZdQZdZd$Zd%Zd&Zd'Zd@ZdAZdBZdCZdDZdEZdFZdGZdHZdIZdJZdKZdLZdMZdNZdOZdPZdQZdRZdSZdTZdUZdVZdWZdXZdYZdZd$Zd%Zd'ZdGZd$ZdZd$Zd%Zd&Zd$Zd'Zd[ZdkZdlZdZdZdZdZd ZdZd$Zd%Zd&Zd'ZŐd@ZƐdAZǐdBZȐdCZɐdDZʐdEZːdFZ̐dGZ͐dHZΐdIZϐdJZАdKZѐdLZҐdMZӐdNZԐdOZՐdPZ֐dQZאdRZؐdSZِdTZڐdUZېdVZܐdWZݐdXZސdYZߐdZZd[Zd\Zd]Zd^Zd_Zd`ZdaZdbZdZd$Zd%Zd&Zd$Zd%Zd&Zd'Zd@ZdAZdBZdCZdDZdEZd$Zd%Zd'ZdCZdZdZdZdZd$Zd%Zd&Zd'Zd@ZdAZdBZd$Zd%Zd&Zd'Z d@Z dAZ dBZ dCZ dDZdEZdFZdGZdHZdIZdJZdKZdLZdMZdNZdOZdPZdQZdRZdSZdTZdUZdߐZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-d$Z.d%Z/dZ0d$Z1d%Z2d&Z3d'Z4d@Z5dZ6d$Z7d%Z8d$Z9d%Z:d'Z;dCZ<dKZ=d[Z>dkZ?dlZ@dZAdZBdZCdZDd!ZEdZFd"ZGd#ZHdZId$ZJd%ZKd&ZLd'ZMd ZNd(ZOdZPd$ZQd%ZRd&ZSd'ZTd$ZUd%ZVd'ZWdCZXdKZYd[ZZdkZ[dlZ\dZ]d$Z^d%Z_d&Z`dZad$Zbd%Zcd&Zdd'Zed@ZfdAZgdBZhdCZidDZjdZkd$Zld%Zmd&Znd'Zod@ZpdAZqdBZrdCZsdDZtdEZudFZvdGZwdHZxdIZydJZzdKZ{dLZ|dMZ}dNZ~dOZdPZdQZdRZdSZdTZdS()Nc@s eZdZdS) libxmlErrorN)__name__ __module__ __qualname__rr)/usr/lib/python3/dist-packages/libxml2.pyrs rcCs:zttj}|dkr|dkrWdSWdSWdSYdS)N PyCObject PyCapsuler)type_objr)objnrrr checkWrapper s rcCst|}|dkr tj|S|SNr)idsysmaxsize)oirrrpos_ids rc@eZdZddZddZdS) treeErrorcC ||_dSNmsgselfrrrr__init__ ztreeError.__init__cC|jSrrrrrr__str__!ztreeError.__str__Nrrrrr#rrrrr rc@r) parserErrorcCrrrrrrrr%r zparserError.__init__cCr!rrr"rrrr#'r$zparserError.__str__Nr%rrrrr'$r&r'c@r)uriErrorcCrrrrrrrr+r zuriError.__init__cCr!rrr"rrrr#-r$zuriError.__str__Nr%rrrrr(*r&r(c@r) xpathErrorcCrrrrrrrr1r zxpathError.__init__cCr!rrr"rrrr#3r$zxpathError.__str__Nr%rrrrr)0r&r)c@s8eZdZddZddZddZd dd Zd d d Zd S) ioWrappercCs||_d|_dSr)_ioWrapper__io_orr rrrr7 zioWrapper.__init__cCs"|jdkrdS|jd|_dSNr)r+closer"rrrio_close;s  zioWrapper.io_closecCs|jdkrdS|jdSr/)r+flushr"rrrio_flushBs  zioWrapper.io_flushr0cCs|jdkrdSz|dkr|j}W|S|j|}W|StyBddl}|d}tdt|td|j|jdkYdSw)Nr0rr zfailed to read from Python:zon IO:)r+read Exceptionrexc_infoprintr )rlenretrerrrio_readHs       zioWrapper.io_readcCs0|jdkrdS|dkr|j|S|j||Sr/)r+write)rstrr9rrrio_writeZs  zioWrapper.io_writeN)r0)rrrrr2r4r<r?rrrrr*6s  r*c@s&eZdZd ddZddZddZdS) ioReadWrappercCst||t|||_dSr)r*r libxml2modxmlCreateInputBufferr,)rr encrrrrbs zioReadWrapper.__init__cCs0td||jdkrt|jd|_dS)N__del__)r8r2r,rBxmlFreeParserInputBufferr"rrrrEfs    zioReadWrapper.__del__cC(||jdkrt|jd|_dSr)r2r,rBrFr"rrrr1m   zioReadWrapper.closeNrA)rrrrrEr1rrrrr@as  r@c@s.eZdZd ddZddZddZdd Zd S) ioWriteWrapperrAcCst|tdkrtdd|_dSt|jdkr3t|}|dkr(t||nt||||_dSt|}|dkrCt||nt||||_dS)NrAzwrite io from a stringr ) r r8rrrBoutputBufferGetPythonFiler*rr,)rr rDfilerrrrts       zioWriteWrapper.__init__cCrGr)r2r,rBxmlOutputBufferCloser"rrrrEs   zioWriteWrapper.__del__cCrGrr4r,rBrMr"rrrr3rHzioWriteWrapper.flushcCrGrrNr"rrrr1rHzioWriteWrapper.closeNrI)rrrrrEr3r1rrrrrJss   rJc@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 handlerscCdS)z#called at the start of the documentNrr"rrr startDocumentzSAXCallback.startDocumentcCrP)z!called at the end of the documentNrr"rrr endDocumentrRzSAXCallback.endDocumentcCrP)zcalled at the start of every element, tag is the name of the element, attrs is a dictionary of the element's attributesNr)rtagattrsrrr startElementzSAXCallback.startElementcCrP)zOcalled at the start of every element, tag is the name of the elementNr)rrTrrr endElementrWzSAXCallback.endElementcCrP)zcalled when character data have been read, data is the string containing the data, multiple consecutive characters() callback are possible.Nrrdatarrr characterszSAXCallback.characterscCrP)zcalled when CDATA section have been read, data is the string containing the data, multiple consecutive cdataBlock() callback are possible.NrrYrrr cdataBlockr\zSAXCallback.cdataBlockcCrP)z.called when an entity reference has been foundNrrnamerrr referencerRzSAXCallback.referencecCrP)z>called when potentially ignorable white spaces have been foundNrrYrrrignorableWhitespacerRzSAXCallback.ignorableWhitespacecCrP)zqcalled when a PI has been found, target contains the PI name and data is the associated data in the PINr)rtargetrZrrrprocessingInstructionrWz!SAXCallback.processingInstructioncCrP)zBcalled when a comment has been found, content contains the commentNrrcontentrrrcommentrRzSAXCallback.commentcCrP)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 availableNrrr_ externalIDsystemIDrrrexternalSubsetr\zSAXCallback.externalSubsetcCrP)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 availableNrrgrrrinternalSubsetr\zSAXCallback.internalSubsetcCrP)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)rr_r rhrirerrr entityDeclzSAXCallback.entityDeclcCrP)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 availableNrrgrrr notationDeclr\zSAXCallback.notationDeclcCrP)z2called when an ATTRIBUTE definition has been foundNr)relemr_r defi defaultValuenameListrrr attributeDeclrRzSAXCallback.attributeDeclcCrP)z0called when an ELEMENT definition has been foundNr)rr_r rerrr elementDeclrRzSAXCallback.elementDeclcCrP)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)rr_publicIdri notationNamerrrrlrmcCdSrrrrrrwarningrRzSAXCallback.warningcCt|rr'rrrrerrorzSAXCallback.errorcCryrrzrrrr fatalErrorr|zSAXCallback.fatalErrorN)rrr__doc__rQrSrVrXr[r]r`rarcrfrjrkrlrnrsrtrxr{r}rrrrrOs, rOc@seZdZdCddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZeZddZddZddZd dlZeejd d!d"krWd#d$ZnFeeddd%Zee ddd&Zee ddd'Zee ddd(Zee ddd)Zee ddd*Zeeddd+Zeeddd,Zeeddd-Z eeddd.Z!dDd/d0Z"dDd1d2Z#   dEd3d4Z$   dEd5d6Z%d7d8Z&d9d:Z'd;d<Z(d=d>Z)d?d@Z*e)Z+dAdBZ,dS)FxmlCoreNcC|dkr ||_dSd|_dSrr,r-rrrr  zxmlCore.__init__cCs0|dkrdSt|j|j}|dkrdS|dkS)NFTrBcompareNodesEqualr,rotherr:rrr__eq__s zxmlCore.__eq__cCs"|dkrdSt|j|j}| S)NTrrrrr__ne__szxmlCore.__ne__cCt|j}|Sr)rBnodeHashr,rr:rrr__hash__s zxmlCore.__hash__cCs|Sr) serializer"rrrr#"r|zxmlCore.__str__cC t|j}|dkr dSt|Sr)rBparentr,nodeWraprrrr get_parent$ zxmlCore.get_parentcCrr)rBchildrenr,rrrrr get_children)rzxmlCore.get_childrencCrr)rBlastr,rrrrrget_last.rzxmlCore.get_lastcCrr)rBnextr,rrrrrget_next3rzxmlCore.get_nextcCs"t|j}|dkr dSt|dSNr )rB propertiesr,xmlAttrrrrrget_properties8s  zxmlCore.get_propertiescCrr)rBprevr,rrrrrget_prev=rzxmlCore.get_prevcC t|jSrrBxmlNodeGetContentr,r"rrr get_contentB zxmlCore.get_contentcCrr)rBr_r,r"rrrget_nameErzxmlCore.get_namecCrr)rBr r,r"rrrget_typeGrzxmlCore.get_typecCs8t|j}|dkr|jdvrt|jdSdSt|dS)N) document_xml document_htmlr)rBdocr,r xmlDocrrrrget_docIs    zxmlCore.get_docrg@cCs|dkrt|j}|dkrdSt|S|dkr)t|j}|dkr$dSt|dS|dkr=t|j}|dkr9dSt|S|dkrQt|j}|dkrMdSt|S|dkret|j}|dkradSt|S|dkryt |j}|dkrudSt|S|dkrt |jS|d krt |jS|d krt |jS|d krt |j}|dkr|j d ks|j d krt|jdSdSt|dSt|)Nrrrrrrrrer_r rrr)rBrr,rrrrrrrrr_r rrAttributeError)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 tocCst|j||Sr)rB serializeNoder,)rencodingformatrrrrszxmlCore.serializecCst|j|||Sr)rB saveNodeTor,)rrLrrrrrsaveToszxmlCore.saveTocCs2|r dd|D}t|j||dk||dkS)NcSg|]}|jqSrr.0rrrr z&xmlCore.c14nMemory..r)rBxmlC14NDocDumpMemoryrr,)rnodes exclusiveprefixes with_commentsrrr c14nMemoryszxmlCore.c14nMemorycCs4|r dd|D}t|j||dk||dk|S)NcSrrrrrrrrrz&xmlCore.c14nSaveTo..r)rBxmlC14NDocSaveTorr,)rrLrrrrrrr c14nSaveToszxmlCore.c14nSaveTocCs:|j}|dkr dS|}||||}||Sr)rxpathNewContextsetContextNode xpathEvalxpathFreeContext)rexprrctxtresrrrrs  zxmlCore.xpathEvalcCs ||Sr)r)rrrrr xpathEval2r zxmlCore.xpathEval2cC(t|j|}|dur dSt|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. Nr)rBxmlNodeRemoveNsDefr,xmlNs)rhrefr: _xmlCore__tmprrr removeNsDefs  zxmlCore.removeNsDefcCt|Sr)xmlCoreDepthFirstItertorr"rrrwalk_depth_firstr|zxmlCore.walk_depth_firstcCrr)xmlCoreBreadthFirstItertorr"rrrwalk_breadth_firstr|zxmlCore.walk_breadth_firstcCs*z|jjWnYt|jdSr)r_ctxtrrB xmlFreeDocr,r"rrrfrees z xmlCore.freerr)NrNr)-rrrrrrrr#rrrrrrr getContentrrrrfloatversionrpropertyrrrrrrrer_r rrrrrrrrrr__iter__rrrrrr sb   /     rc@(eZdZddZddZddZeZdS)rcC||_g|_dSrnodeparentsrrrrrrr.z!xmlCoreDepthFirstItertor.__init__cC|Srrr"rrrrz!xmlCoreDepthFirstItertor.__iter__cCV |jr|j}|j|j|jj|_|Sz|j}Wn ty%tw|j|_qr)rrappendrpop IndexError StopIterationrrr:rrrr__next__  z!xmlCoreDepthFirstItertor.__next__Nrrrrrrrrrrrr  rc@r)rcCrrrrrrrr'r.z#xmlCoreBreadthFirstItertor.__init__cCrrrr"rrrr*rz#xmlCoreBreadthFirstItertor.__iter__cCrr)rrrrrrrrrrrrr,rz#xmlCoreBreadthFirstItertor.__next__Nrrrrrr&rrcCst|}|dks |dkrt|dS|dkrt|dS|dddkr(t|dS|dkr1t|dS|d kr:t|dS|d krCt|dS|d krLt|dS|d krUt |dSt|dS) Nelementtextr attributerdocument namespace elem_declattribute_decl entity_decldtd) rBr xmlNoderrr xmlElement xmlAttribute xmlEntityxmlDtd)rr_rrrr=s$          rcCsxt|}|tgkrttt|}|S|tdkr$ttt|}t|S|tdks6|tdks6|tdkr8|St|S)NrrArg)r listmapxpathObjectRettupler)rotyper:rrrrRs  $rcCst||||}dSr)rBxmlRegisterXPathFunction)rr_ns_urifr:rrrregisterXPathFunctionbsrr rcCs:ddl}d|jvrt||}|Sddl}|||}|S)zpRegister a Python written function to for error reporting. The function is called back as f(ctx, error). rNlibxslt)rmodulesrBxmlRegisterErrorHandlerr registerErrorHandler)rctxrr:r rrrr xs   r c@6eZdZd ddZddZddZdd Zd d ZdS) parserCtxtCoreNcCrrrr-rrrrrzparserCtxtCore.__init__cC |jdkr t|jd|_dSrr,rBxmlFreeParserCtxtr"rrrrE   zparserCtxtCore.__del__cCt|j||dS)zRegister an error handler that will be called back as f(arg,msg,severity,reserved). @reserved is currently always None.N)rBxmlParserCtxtSetErrorHandlerr,rrargrrrsetErrorHandlerzparserCtxtCore.setErrorHandlercCr)WReturn (f,arg) as previously registered with setErrorHandler or (None,None).)rBxmlParserCtxtGetErrorHandlerr,r"rrrgetErrorHandler zparserCtxtCore.getErrorHandlercCst|j|S)z(Register a local catalog with the parser)rBaddLocalCatalogr,rurirrrrszparserCtxtCore.addLocalCatalogr)rrrrrErrrrrrrrs   rc@eZdZddZdddZdS) ValidCtxtCorecOrwrrrargskwrrrrrzValidCtxtCore.__init__NcCt|j|||dS)zy Register error and warning handlers for DTD validation. These will be called back as f(msg,arg) N)rBxmlSetValidErrorsr,rerr_func warn_funcrrrrsetValidityErrorHandlerz%ValidCtxtCore.setValidityErrorHandlerrrrrrr+rrrrr"r"c@r!)SchemaValidCtxtCorecOrwrrr#rrrrrzSchemaValidCtxtCore.__init__NcCr&)z| Register error and warning handlers for Schema validation. These will be called back as f(msg,arg) N)rBxmlSchemaSetValidErrorsr,r(rrrr+r,z+SchemaValidCtxtCore.setValidityErrorHandlerrr-rrrrr/r.r/c@r!)relaxNgValidCtxtCorecOrwrrr#rrrrrzrelaxNgValidCtxtCore.__init__NcCr&)z} Register error and warning handlers for RelaxNG validation. These will be called back as f(msg,arg) N)rBxmlRelaxNGSetValidErrorsr,r(rrrr+r,z,relaxNgValidCtxtCore.setValidityErrorHandlerrr-rrrrr1r.r1cCs|\}}||||t|S)z)Intermediate callback to wrap the locator)xmlTextReaderLocator)xxx_todo_changemerseveritylocatorrrrrr_xmlTextReaderErrorFuncsr7c@.eZdZd ddZddZddZdd ZdS) xmlTextReaderCoreNcCs"d|_|dkr ||_dSd|_dSr)inputr,r-rrrrs zxmlTextReaderCore.__init__cCrrr,rBxmlFreeTextReaderr"rrrrErzxmlTextReaderCore.__del__cCs4|durt|jdddSt|jt||fdS)z]Register an error handler that will be called back as f(arg,msg,severity,locator).N)rBxmlTextReaderSetErrorHandlerr,r7rrrrSetErrorHandlers z!xmlTextReaderCore.SetErrorHandlercCs t|j\}}|durdS|S)rN)NN)rBxmlTextReaderGetErrorHandlerr,rrrrGetErrorHandlersz!xmlTextReaderCore.GetErrorHandlerr)rrrrrEr>r@rrrrr9s   r9cCs tdSrrBxmlPythonCleanupParserrrrr cleanupParserrrCcCs dd}t|t|dS)NcSs*ttD]}||}|dur|SqdSr)reversed__input_callbacks)URIcbrrrrfindOpenCallbacks z/registerInputCallback..findOpenCallback)rBxmlRegisterInputCallbackrEr)funcrHrrrregisterInputCallbacks rKcCs0ttdkr tttdkrtdSdSr)r9rErrBxmlUnregisterInputCallbackrrrrpopInputCallbackss   rMcC&t||}|durtdt|dS)z8Create a parser context for an HTML in-memory document. Nz#htmlCreateMemoryParserCtxt() failedr)rBhtmlCreateMemoryParserCtxtr' parserCtxtbuffersizer:rrrrO  rOcCt|}|S)zISet and return the previous value for handling HTML omitted tags. )rBhtmlHandleOmittedElemvalr:rrrrV rVcCrU)z0Check if an attribute is of content type Script )rBhtmlIsScriptAttributer_r:rrrrZ% rZcC"t}|dur tdt|dS).Allocate and initialize a new parser context. NzhtmlNewParserCtxt() failedr)rBhtmlNewParserCtxtr'rPr:rrrr_* r_cCrN)z3parse an HTML in-memory document and build a tree. NzhtmlParseDoc() failedr)rB htmlParseDocr'r)currr:rrrrb0rTrbcCrN)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() failedr)rB htmlParseFiler'rfilenamerr:rrrrd6  rdcC*t||||}|durtdt|dS)2parse an XML in-memory document and build a tree. NzhtmlReadDoc() failedr)rB htmlReadDocrrrcURLroptionsr:rrrrj> rjcCrh)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() failedr)rB htmlReadFdrrfdrlrrmr:rrrroD rocC(t|||}|durtdt|dS)6parse an XML file from the filesystem or the network. NzhtmlReadFile() failedr)rB htmlReadFilerrrfrrmr:rrrruL rucC,t|||||}|durtdt|dS)riNzhtmlReadMemory() failedr)rBhtmlReadMemoryrrrRrSrlrrmr:rrrryR rycCrU)z7Determine if a given attribute is a boolean attribute. )rBhtmlIsBooleanAttrr[rrrr|\r\r|cCrN)zCreates a new HTML document NzhtmlNewDoc() failedr)rB htmlNewDocrrrF ExternalIDr:rrrr}arTr}cCrN)zWCreates a new HTML document without a DTD node if @URI and @ExternalID are None NzhtmlNewDocNoDtD() failedr)rBhtmlNewDocNoDtDrrr~rrrrg  rcCrU)aSet 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. )rBxmlSAXDefaultVersionrr:rrrSAXDefaultVersionrs rcC tdS)z$Initialize the default SAX2 handler N)rBxmlDefaultSAXHandlerInitrrrrdefaultSAXHandlerInit{ rcCrz#Initialize the default SAX handler N)rBdocbDefaultSAXHandlerInitrrrrrrrcCrr)rBhtmlDefaultSAXHandlerInitrrrrrrrcCt|||}|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(); )rB xmlCatalogAdd)r origreplacer:rrr catalogAddrcCr)z0Free up all the memory associated with catalogs N)rBxmlCatalogCleanuprrrrcatalogCleanuprrcC t}|Sz1Convert all the SGML catalog entries as XML ones )rBxmlCatalogConvertr`rrrcatalogConvertrcCs|dur|t|dS)z7Dump all the global catalog content to the given file. N)r3rBxmlCatalogDump)outrrr catalogDumpsrcCrU)zoTry to lookup the catalog reference associated to a public ID DEPRECATED, use xmlCatalogResolvePublic() )rBxmlCatalogGetPublicpubIDr:rrrcatalogGetPublicrYrcCrU)zoTry to lookup the catalog reference associated to a system ID DEPRECATED, use xmlCatalogResolveSystem() )rBxmlCatalogGetSystemsysIDr:rrrcatalogGetSystemrYrcCrUz!Remove an entry from the catalog )rBxmlCatalogRemovevaluer:rrr catalogRemover\rcCt||}|Sz:Do a complete resolution lookup of an External Identifier )rBxmlCatalogResolve)rrr:rrrcatalogResolve rcCrU)zETry to lookup the catalog reference associated to a public ID )rBxmlCatalogResolvePublicrrrrcatalogResolvePublicrYrcCrUz3Try to lookup the catalog resource for a system ID )rBxmlCatalogResolveSystemrrrrcatalogResolveSystemr\rcCrUz*Do a complete resolution lookup of an URI )rBxmlCatalogResolveURIrFr:rrrcatalogResolveURIr\rcCrU)z[Used to set the debug level for catalog operation, 0 disable debugging, 1 enable it )rBxmlCatalogSetDebug)levelr:rrrcatalogSetDebugrYrcCr)zDo the catalog initialization. this function is not thread safe, catalog initialization should preferably be done once at startup N)rBxmlInitializeCatalogrrrrinitializeCatalog rcC$t|}|dur tdt|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() failedr)rBxmlLoadACatalogrcatalogrfr:rrr loadACatalog  rcCrU)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 )rBxmlLoadCatalogrrrr loadCatalog rcCt|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)rBxmlLoadCatalogs)pathssrrr loadCatalogsrcCr)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() failedr)rBxmlLoadSGMLSuperCatalogrrrrrrloadSGMLSuperCatalogrrcCr)zcreate a new Catalog. NzxmlNewCatalog() failedr)rB xmlNewCatalogrr)sgmlr:rrr newCatalog  rcCr)zjparse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups. NzxmlParseCatalogFile() failedr)rBxmlParseCatalogFiler'rrrrrparseCatalogFile  rcCrU)zSThis function is DEPRECATED. Use xmlIsBaseChar_ch or xmlIsBaseCharQ instead )rB xmlIsBaseCharchr:rrr isBaseCharrYrcCrU)zMThis function is DEPRECATED. Use xmlIsBlank_ch or xmlIsBlankQ instead )rB xmlIsBlankrrrrisBlank rYrcCrU)zKThis function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ instead )rB xmlIsCharrrrrisCharrYrcCrU)z9This function is DEPRECATED. Use xmlIsCombiningQ instead )rBxmlIsCombiningrrrr isCombiningr\rcCrU)zMThis function is DEPRECATED. Use xmlIsDigit_ch or xmlIsDigitQ instead )rB xmlIsDigitrrrrisDigitrYrcCrU)zSThis function is DEPRECATED. Use xmlIsExtender_ch or xmlIsExtenderQ instead )rB xmlIsExtenderrrrr isExtender"rYrcCrU)z;This function is DEPRECATED. Use xmlIsIdeographicQ instead )rBxmlIsIdeographicrrrr isIdeographic(r\rcCrU)zUThis function is DEPRECATED. Use xmlIsPubidChar_ch or xmlIsPubidCharQ instead )rBxmlIsPubidCharrrrr isPubidChar-rYrcCrU)z&Convenient way to turn bool into text )rB xmlBoolToText)boolvalr:rrr boolToText7r\rcCs |dur|t||dS)zrrrdebugDumpString<srcCst||dS)z6Print the xpath error to libxml default error channel N)rBxmlShellPrintXPathError) errorTyperrrrshellPrintXPathErrorArcCr)z^Free the dictionary mutex. Do not call unless sure the library is not in use anymore ! N)rBxmlDictCleanuprrrr dictCleanupIrrcCr)zKDo the dictionary mutex initialization. this function is deprecated )rBxmlInitializeDictr`rrrinitializeDictNrcCr)zbRegisters an alias @alias for an encoding named @name. Existing alias will be overwritten. )rBxmlAddEncodingAlias)r_aliasr:rrraddEncodingAliasX rcCr)z}Cleanup the memory allocated for the char encoding support, it unregisters all the encoding handlers and the aliases. N)rBxmlCleanupCharEncodingHandlersrrrrcleanupCharEncodingHandlers^rrcCr)zUnregisters all aliases N)rBxmlCleanupEncodingAliasesrrrrcleanupEncodingAliasescrrcCrU)z%Unregisters an encoding alias @alias )rBxmlDelEncodingAliasrr:rrrdelEncodingAliasgr\rcCrU)z-Lookup an encoding name for the given alias. )rBxmlGetEncodingAliasrrrr encodingAliaslr\rcCr)zInitialize the char encoding support, it registers the default encoding supported. NOTE: while public, this function usually doesn't need to be called in normal processing. N)rBxmlInitCharEncodingHandlersrrrrinitCharEncodingHandlersqs rcCr)z:Cleanup up the predefined entities table. Deprecated call N)rBxmlCleanupPredefinedEntitiesrrrrcleanupPredefinedEntities|rrcCr)z0Set up the predefined entities. Deprecated call N)rBxmlInitializePredefinedEntitiesrrrrinitializePredefinedEntitiesrrcCr)z1Check whether this name is an predefined entity. NzxmlGetPredefinedEntity() failedr)rBxmlGetPredefinedEntityrrr[rrrpredefinedEntityrr cCr)z'Additional cleanup for multi-threading N)rBxmlCleanupGlobalsrrrrcleanupGlobalsrr cCr)z.Additional initialisation for multi-threading N)rBxmlInitGlobalsrrrr initGlobalsrr cCrUr)rBxmlThrDefDefaultBufferSizevr:rrrthrDefDefaultBufferSize rcCrUr)rB'xmlThrDefDoValidityCheckingDefaultValuerrrr$thrDefDoValidityCheckingDefaultValuerrcCrUr)rB xmlThrDefGetWarningsDefaultValuerrrrthrDefGetWarningsDefaultValuerrcCrUr)rBxmlThrDefIndentTreeOutputrrrrthrDefIndentTreeOutputrrcCrUr)rBxmlThrDefKeepBlanksDefaultValuerrrrthrDefKeepBlanksDefaultValuerrcCrUr)rB xmlThrDefLineNumbersDefaultValuerrrrthrDefLineNumbersDefaultValuerrcCrUr)rBxmlThrDefLoadExtDtdDefaultValuerrrrthrDefLoadExtDtdDefaultValuerrcCrUr)rBxmlThrDefParserDebugEntitiesrrrrthrDefParserDebugEntitiesrr cCrUr)rB#xmlThrDefPedanticParserDefaultValuerrrr thrDefPedanticParserDefaultValuerr"cCrUr)rBxmlThrDefSaveNoEmptyTagsrrrrthrDefSaveNoEmptyTagsrr$cCrUr)rB'xmlThrDefSubstituteEntitiesDefaultValuerrrr$thrDefSubstituteEntitiesDefaultValuerr&cCrUr)rBxmlThrDefTreeIndentStringrrrrthrDefTreeIndentStringrr(cCr)zGCleanup the FTP protocol layer. This cleanup proxy information. N)rBxmlNanoFTPCleanuprrrrnanoFTPCleanuprr*cCr)zoInitialize the FTP protocol layer. Currently it just checks for proxy information, and get the hostname N)rBxmlNanoFTPInitrrrr nanoFTPInitrr,cCst|||||dS)zSetup the FTP proxy information. This can also be done by using ftp_proxy ftp_proxy_user and ftp_proxy_password environment variables. N)rBxmlNanoFTPProxy)hostportuserpasswdr rrr nanoFTPProxysr2cCr)z(Re)Initialize the FTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like ftp://myproxy/ or ftp://myproxy:3128/ A None URL cleans up proxy information. N)rBxmlNanoFTPScanProxyrlrrrnanoFTPScanProxyrr5cCr)z!Cleanup the HTTP protocol layer. N)rBxmlNanoHTTPCleanuprrrrnanoHTTPCleanuprr7cCr)zZInitialize the HTTP protocol layer. Currently it just checks for proxy information N)rBxmlNanoHTTPInitrrrr nanoHTTPInitrr9cCr)z(Re)Initialize the HTTP Proxy context by parsing the URL and finding the protocol host port it indicates. Should be like http://myproxy/ or http://myproxy:3128/ A None URL cleans up proxy information. N)rBxmlNanoHTTPScanProxyr4rrrnanoHTTPScanProxyrr;cCr)z8Creates a parser context for an XML in-memory document. NzxmlCreateDocParserCtxt() failedr)rBxmlCreateDocParserCtxtr'rPrcr:rrrcreateDocParserCtxtrr>cCr)zInitialization function for the XML parser. This is not reentrant. Call once before processing in case of use in multithreaded programs. N)rB xmlInitParserrrrr initParserrr@cCrU)aHSet and return the previous value for default blanks text nodes support. The 1.x version of the parser used an heuristic to try to detect ignorable white spaces. As a result the SAX callback was generating xmlSAX2IgnorableWhitespace() callbacks instead of characters() one, and when using the DOM output text nodes containing those blanks were not generated. The 2.x and later version will switch to the XML standard way and ignorableWhitespace() are only generated when running the parser in validating mode and when the current element doesn't allow CDATA or mixed content. This function is provided as a way to force the standard behavior on 1.X libs and to switch back to the old mode for compatibility when running 1.X client code on 2.X . Upgrade of 1.X code should be done by using xmlIsBlankNode() commodity function to detect the "empty" nodes generated. This value also affect autogeneration of indentation when saving code if blanks sections are kept, indentation is not generated. )rBxmlKeepBlanksDefaultrWrrrkeepBlanksDefaults rBcCrU)zSet and return the previous value for enabling line numbers in elements contents. This may break on old application and is turned off by default. )rBxmlLineNumbersDefaultrWrrrlineNumbersDefault rDcCr])r^NzxmlNewParserCtxt() failedr)rBxmlNewParserCtxtr'rPr`rrr newParserCtxt"rarGcCrN)z#Load and parse an external subset. NzxmlParseDTD() failedr)rB xmlParseDTDr'r)rSystemIDr:rrrparseDTD(rTrJcCr)riNzxmlParseDoc() failedr)rB xmlParseDocr'rr=rrrparseDoc.rrLcCr)zparse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk NzxmlParseEntity() failedr)rBxmlParseEntityr'rrrrr parseEntity4  rNcCr)zparse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. NzxmlParseFile() failedr)rB xmlParseFiler'rrrrr parseFile<rOrQcCrN)z/parse an XML in-memory block and build a tree. NzxmlParseMemory() failedr)rBxmlParseMemoryr'rrQrrr parseMemoryDrTrScCrU)zISet and return the previous value for enabling pedantic warnings. )rBxmlPedanticParserDefaultrWrrrpedanticParserDefaultJrYrUcCrh)riNzxmlReadDoc() failedr)rB xmlReadDocrrrkrrrreadDocPrnrWcCrh)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() failedr)rB xmlReadFdrrrprrrreadFdVrrrYcCrs)rtNzxmlReadFile() failedr)rB xmlReadFilerrrvrrrreadFile^rwr[cCrx)riNzxmlReadMemory() failedr)rB xmlReadMemoryrrrzrrr readMemorydr{r]cCr)zparse 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() failedr)rB xmlRecoverDocrrr=rrr recoverDocjrOr_cCr)zparse 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() failedr)rBxmlRecoverFilerrrrrr recoverFilerrracCrN)zparse 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() failedr)rBxmlRecoverMemoryrrrQrrr recoverMemory{rgrccCrU)a\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. )rBxmlSubstituteEntitiesDefaultrWrrrsubstituteEntitiesDefault recCrU)a1Checks 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 )rBxmlCheckLanguageID)langr:rrrcheckLanguageIDs ricCrz#append the char value in the array )rB xmlCopyChar)r9rrXr:rrrcopyCharrlcCrrj)rBxmlCopyCharMultiByte)rrXr:rrrcopyCharMultiByterrocCrs)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() failedr)rBxmlCreateEntityParserCtxtr'rP)rlIDbaser:rrrcreateEntityParserCtxts rscCr)Create 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() failedr)rBxmlCreateFileParserCtxtr'rPrrrrcreateFileParserCtxtrOrvcCrN)z7Create a parser context for an XML in-memory document. Nz"xmlCreateMemoryParserCtxt() failedr)rBxmlCreateMemoryParserCtxtr'rPrQrrrcreateMemoryParserCtxtrTrxcCrN)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() failedr)rBxmlCreateURLParserCtxtr'rP)rfrmr:rrrcreateURLParserCtxts  rzcCrN)rtNz!htmlCreateFileParserCtxt() failedr)rBhtmlCreateFileParserCtxtr'rPrerrrr{rgr{cCr)zThis is a no-op now. N)rBhtmlInitAutoCloserrrrr|rr|cCrU)zgCheck whether the character is allowed by the production [84] Letter ::= BaseChar | Ideographic )rB xmlIsLetter)cr:rrrisLetterrYrcC"|durd}n|j}t|}|S)z.Pops the top element name from the name stack N)r,rBnamePoprctxt__or:rrrr rcCs$|durd}n|j}t||}|S)z3Pushes a new element name on top of the name stack N)r,rBnamePush)rrrr:rrrrs rcCs8|durd}n|j}t|}|durtdt|dS)z.Pops the top element node from the node stack NznodePop() failedr)r,rBnodePoprrrrrrrs   rcCs8|durd}n|j}|durd}n|j}t||}|S)z3Pushes a new element node on top of the node stack N)r,rBnodePush)rrrvalue__or:rrrrs  rcCt|||dS)zmInterface to parse an XML file or resource pointed by an URI to build an event flow to the SAX object N)rBxmlSAXParseFile)SAXrFrecoverrrr SAXParseFilercCrN)z1Create a libxml2 input buffer from a Python file NzxmlCreateInputBuffer() failedr)rBrCr inputBufferrLrr:rrrcreateInputBufferrTrcCrN)z2Create a libxml2 output buffer from a Python file NzxmlCreateOutputBuffer() failedr)rBxmlCreateOutputBufferr outputBufferrrrrcreateOutputBufferrTrcCrh)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() failedr)rBxmlCreatePushParserr'rPrchunkrSrFr:rrrcreatePushParser"rrrcCrU)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. )rBxmlDebugMemory)activater:rrr debugMemory*rErcCr)z/dump the memory allocated in the file .memdump N)rB xmlDumpMemoryrrrr dumpMemory1rrcCrh)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() failedr)rBhtmlCreatePushParserr'rPrrrrr5rrrcCr)znInterface to parse an HTML file or resource pointed by an URI to build an event flow to the SAX object N)rBhtmlSAXParseFile)rrFrrrrr=rrcCr)z8Returns the total amount of memory allocated by libxml2 )rB xmlMemoryUsedr`rrr memoryUsedBrrcCr)zCreate a new Node NzxmlNewNode() failedr)rB xmlNewNoderrr[rrrnewNodeGrrcCr)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. NrArrrrpythonCleanupParserMs rcCrU)z-Set the entity resolver as a python function )rBxmlSetEntityLoader)resolverr:rrrsetEntityLoaderWr\rcCr)zFCleanup the default Schemas type library associated to RelaxNG N)rBxmlRelaxNGCleanupTypesrrrrrelaxNGCleanupTypes`rrcCr)z'Initialize the default type libraries. )rBxmlRelaxNGInitTypesr`rrrrelaxNGInitTypeserrcCrN)zmCreate an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file. Nz#xmlRelaxNGNewMemParserCtxt() failedr)rBxmlRelaxNGNewMemParserCtxtr'relaxNgParserCtxtrQrrrrelaxNGNewMemParserCtxtjrrcCr)zmCreate an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file. Nz xmlRelaxNGNewParserCtxt() failedr)rBxmlRelaxNGNewParserCtxtr'rrlr:rrrrelaxNGNewParserCtxtqrrcCst||||}|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. )rB xmlBuildQName)ncnameprefixmemoryr9r:rrr buildQName|rcCr)z3get the default compression mode used, ZLIB based. )rBxmlGetCompressModer`rrr compressModerrcCr)z7Try to find if the document correspond to an XHTML DTD )rB xmlIsXHTML)ripublicIDr:rrrisXHTMLrrcCr)z-Creation of a new node containing a comment. NzxmlNewComment() failedr)rB xmlNewCommentrrrer:rrr newCommentrrcCr)zCreates a new XML document NzxmlNewDoc() failedr)rB xmlNewDocrrrrrrnewDocrrcCrN)zhCreation of a processing instruction element. Use xmlDocNewPI preferably to get string interning NzxmlNewPI() failedr)rBxmlNewPIrr)r_rer:rrrnewPIrrcCr)zCreation of a new text node. NzxmlNewText() failedr)rB xmlNewTextrrrrrrnewTextrrcCrN)zTCreation of a new text node with an extra parameter for the content's length NzxmlNewTextLen() failedr)rB xmlNewTextLenrr)rer9r:rrr newTextLenrrcCr)zqset the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression) N)rBxmlSetCompressMode)moderrrsetCompressModercCr)z;Check that a value conforms to the lexical space of NCName )rBxmlValidateNCNamerspacer:rrrvalidateNCNamerrcCr)zr:rrr URIEscaperErcCr)zzThis routine escapes a string to hex, ignoring reserved characters (a-z) and the characters in the exception list. )rBxmlURIEscapeStr)r>rr:rrr URIEscapeStrrrcCr)zUnescaping routine, but does not check that the string is an URI. The output is a direct unsigned char translation of %XX values (no encoding) Note that the length of the result can only be smaller or same size as the input string. )rBxmlURIUnescapeString)r>r9rbr:rrrURIUnescapeStringrrcCr)a!Expresses the URI of the reference in terms relative to the base. Some examples of this operation include: base = "http://site1.com/docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif http://site2.com/docs/pic1.gif http://site2.com/docs/pic1.gif base = "docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif Note: if the URI reference is really weird or complicated, it may be worthwhile to first convert it into a "nice" one by calling xmlBuildURI (using 'base') before calling this routine, since this routine (for reasonable efficiency) assumes URI has already been through some validation. )rBxmlBuildRelativeURIrFrrr:rrrbuildRelativeURIs rcCr)a Computes he final URI of the reference done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396 5.2. Resolving Relative References to Absolute Form )rB xmlBuildURIrrrrbuildURI rcCrU)z3Constructs a canonic path from the specified path. )rBxmlCanonicPathpathr:rrr canonicPathr\rcCr])zSimply creates an empty xmlURI NzxmlCreateURI() failedr)rB xmlCreateURIr(rFr`rrr createURIrarcCrU)zApplies the 5 normalization steps to a path string--that is, RFC 2396 Section 5.2, steps 6.c through 6.g. Normalization occurs directly on the string, no new allocation is done )rBxmlNormalizeURIPathrrrrnormalizeURIPath rrcCr)zfParse an URI based on RFC 3986 URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ] NzxmlParseURI() failedr)rB xmlParseURIr(rFrrrrparseURIrrcCrN)zjParse an URI but allows to keep intact the original fragments. URI-reference = URI / relative-ref NzxmlParseURIRaw() failedr)rBxmlParseURIRawr(rF)r>rawr:rrr parseURIRawrrcCrU)z/Constructs an URI expressing the existing path )rB xmlPathToURIrrrr pathToURI r\rcCr])z)Allocate a validation context structure. NzxmlNewValidCtxt() failedr)rBxmlNewValidCtxtr ValidCtxtr`rrr newValidCtxt)rarcCrU)z4Validate that the given value match Name production )rBxmlValidateNameValuerrrrvalidateNameValue/r\rcCrU)z5Validate that the given value match Names production )rBxmlValidateNamesValuerrrrvalidateNamesValue4r\rcCrU)zRValidate that the given value match Nmtoken production [ VC: Name Token ] )rBxmlValidateNmtokenValuerrrrvalidateNmtokenValue9rYrcCrU)zSValidate that the given value match Nmtokens production [ VC: Name Token ] )rBxmlValidateNmtokensValuerrrrvalidateNmtokensValue?rYrcCrU)zfunction checks to see if @path is a valid source (file, socket...) for XML. if stat is not available on the target machine, )rBxmlCheckFilenamerrrr checkFilenameIrErcCr)zRclears the entire input callback table. this includes the compiled-in I/O. N)rBxmlCleanupInputCallbacksrrrrcleanupInputCallbacksPrrcCr)z]clears the entire output callback table. this includes the compiled-in I/O callbacks. N)rBxmlCleanupOutputCallbacksrrrrcleanupOutputCallbacksUrrcCrU)zinput from FILE * )rB xmlFileMatchrrrr fileMatchZr\rcCrU)z$check if the URI matches an FTP one )rB xmlIOFTPMatchrrrr iOFTPMatch_r\rcCrU)z%check if the URI matches an HTTP one )rBxmlIOHTTPMatchrrrr iOHTTPMatchdr\rcCrU)z\This function is obsolete. Please see xmlURIFromPath in uri.c for a better solution. )rBxmlNormalizeWindowsPathrrrrnormalizeWindowsPathirYr cCrU)z#lookup the directory for that file )rBxmlParserGetDirectoryrrrrparserGetDirectoryor\r cCr)zaRemove the top output callbacks from the output stack. This includes the compiled-in I/O. )rBxmlPopOutputCallbacksr`rrrpopOutputCallbackstrrcCrz0Registers the default compiled-in I/O handlers. N)rB xmlRegisterDefaultInputCallbacksrrrrregisterDefaultInputCallbackszrrcCrr)rB!xmlRegisterDefaultOutputCallbacksrrrrregisterDefaultOutputCallbacks~rrcCr)zBy default, libxml submits HTTP output requests using the "PUT" method. Calling this method changes the HTTP output method to use the "POST" method instead. N)rBxmlRegisterHTTPPostCallbacksrrrrregisterHTTPPostCallbacksrrcCr])zaGet the last global error registered. This is per thread if compiled with thread support. NzxmlGetLastError() failedr)rBxmlGetLastErrorrErrorr`rrr lastErrors rcCr)ztCleanup the last global error registered. For parsing error this does not change the well-formedness result. N)rBxmlResetLastErrorrrrrresetLastErrorrrcCr)zGCreate an xmlTextReader structure fed with the resource at @URI Nz!xmlNewTextReaderFilename() failedr)rBxmlNewTextReaderFilenamer xmlTextReaderrrrrnewTextReaderFilenamerrcCrh)~Create an xmltextReader for an XML in-memory document. The parsing flags @options are a combination of xmlParserOption. NzxmlReaderForDoc() failedr)rBxmlReaderForDocrrrkrrr readerForDocs r cCrh)zCreate an xmltextReader for an XML from a file descriptor. The parsing flags @options are a combination of xmlParserOption. NOTE that the file descriptor will not be closed when the reader is closed or reset. NzxmlReaderForFd() failedr)rBxmlReaderForFdrrrprrr readerForFds r"cCrs)z}parse an XML file from the filesystem or the network. The parsing flags @options are a combination of xmlParserOption. NzxmlReaderForFile() failedr)rBxmlReaderForFilerrrvrrr readerForFiles r$cCrx)rNzxmlReaderForMemory() failedr)rBxmlReaderForMemoryrrrzrrrreaderForMemorys r&cCr)zParses a regular expression conforming to XML Schemas Part 2 Datatype Appendix F and builds an automata suitable for testing strings against that regular expression NzxmlRegexpCompile() failedr)rBxmlRegexpCompilerxmlReg)regexpr:rrr regexpCompilerOr*cCrN)zkCreate an XML Schemas parse context for that memory buffer expected to contain an XML Schemas file. Nz"xmlSchemaNewMemParserCtxt() failedr)rBxmlSchemaNewMemParserCtxtr'SchemaParserCtxtrQrrrschemaNewMemParserCtxtrr-cCr)zkCreate an XML Schemas parse context for that file/resource expected to contain an XML Schemas file. NzxmlSchemaNewParserCtxt() failedr)rBxmlSchemaNewParserCtxtr'r,rrrrschemaNewParserCtxtrr/cCr)z-Cleanup the default XML Schemas type library N)rBxmlSchemaCleanupTypesrrrrschemaCleanupTypesrr1cCrU)z1Removes and normalize white spaces in the string )rBxmlSchemaCollapseStringrrrrschemaCollapseStringr\r3cCr)z0Initialize the default XML Schemas type library N)rBxmlSchemaInitTypesrrrrschemaInitTypesrr5cCrU)z(Replaces 0xd, 0x9 and 0xa with a space. )rBxmlSchemaWhiteSpaceReplacerrrrschemaWhiteSpaceReplacer\r7cCr)zcompares the two UCS4 values )rBxmlUTF8Charcmp)utf1utf2r:rrr UTF8Charcmprr;cCrU)z1calculates the internal size of a UTF8 character )rB xmlUTF8Sizeutfr:rrrUTF8Sizer\r?cCrU)zncompute the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string. )rB xmlUTF8Strlenr=rrr UTF8StrlenrYrAcCr)z;a function to provide the relative location of a UTF8 char )rB xmlUTF8Strloc)r>utfcharr:rrr UTF8Strloc rrDcCr)za strndup for array of UTF8's )rBxmlUTF8Strndupr>r9r:rrr UTF8StrnduprrGcCr)zXa function to provide the equivalent of fetching a character from a string array )rB xmlUTF8Strpos)r>posr:rrr UTF8StrposrrJcCr)zgstorage size of an UTF8 string the behaviour is not guaranteed if the input string is not UTF-8 )rBxmlUTF8StrsizerFrrr UTF8StrsizerrLcCr)zgCreate a substring from a given UTF-8 string Note: positions are given in units of UTF-8 chars )rB xmlUTF8Strsub)r>startr9r:rrr UTF8StrsubrOcCrU)asChecks @utf for being valid UTF-8. @utf is assumed to be null-terminated. This function is not super-strict, as it will allow longer UTF-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value. )rB xmlCheckUTF8r=rrr checkUTF8%rfrRcCrU)zFCheck whether the character is part of AegeanNumbers UCS Block )rBxmlUCSIsAegeanNumberscoder:rrruCSIsAegeanNumbers3rYrVcCrU)zTCheck whether the character is part of AlphabeticPresentationForms UCS Block )rB#xmlUCSIsAlphabeticPresentationFormsrTrrr uCSIsAlphabeticPresentationForms9rYrXcCrU)z8Check whether the character is part of Arabic UCS Block )rBxmlUCSIsArabicrTrrr uCSIsArabic?r\rZcCrU)zRCheck whether the character is part of ArabicPresentationForms-A UCS Block )rB xmlUCSIsArabicPresentationFormsArTrrruCSIsArabicPresentationFormsADrYr\cCrU)zRCheck whether the character is part of ArabicPresentationForms-B UCS Block )rB xmlUCSIsArabicPresentationFormsBrTrrruCSIsArabicPresentationFormsBJrYr^cCrU)z:Check whether the character is part of Armenian UCS Block )rBxmlUCSIsArmenianrTrrr uCSIsArmenianPr\r`cCrU)z8Check whether the character is part of Arrows UCS Block )rBxmlUCSIsArrowsrTrrr uCSIsArrowsUr\rbcCrU)z r\rcCrU)z7Check whether the character is part of Pi UCS Category )rB xmlUCSIsCatPirTrrr uCSIsCatPiC r\rcCrU)z7Check whether the character is part of Po UCS Category )rB xmlUCSIsCatPorTrrr uCSIsCatPoH r\rcCrU)z7Check whether the character is part of Ps UCS Category )rB xmlUCSIsCatPsrTrrr uCSIsCatPsM r\rcCrU)z6Check whether the character is part of S UCS Category )rB xmlUCSIsCatSrTrrr uCSIsCatSR r\rcCrU)z7Check whether the character is part of Sc UCS Category )rB xmlUCSIsCatScrTrrr uCSIsCatScW r\rcCrU)z7Check whether the character is part of Sk UCS Category )rB xmlUCSIsCatSkrTrrr uCSIsCatSk\ r\rcCrU)z7Check whether the character is part of Sm UCS Category )rB xmlUCSIsCatSmrTrrr uCSIsCatSma r\rcCrU)z7Check whether the character is part of So UCS Category )rB xmlUCSIsCatSorTrrr uCSIsCatSof r\rcCrU)z6Check whether the character is part of Z UCS Category )rB xmlUCSIsCatZrTrrr uCSIsCatZk r\rcCrU)z7Check whether the character is part of Zl UCS Category )rB xmlUCSIsCatZlrTrrr uCSIsCatZlp r\rcCrU)z7Check whether the character is part of Zp UCS Category )rB xmlUCSIsCatZprTrrr uCSIsCatZpu r\rcCrU)z7Check whether the character is part of Zs UCS Category )rB xmlUCSIsCatZsrTrrr uCSIsCatZsz r\rcCrU)z:Check whether the character is part of Cherokee UCS Block )rBxmlUCSIsCherokeerTrrr uCSIsCherokee r\rcCrU)zRCheck whether the character is part of CombiningDiacriticalMarks UCS Block )rB!xmlUCSIsCombiningDiacriticalMarksrTrrruCSIsCombiningDiacriticalMarks rYrcCrU)z\Check whether the character is part of CombiningDiacriticalMarksforSymbols UCS Block )rB+xmlUCSIsCombiningDiacriticalMarksforSymbolsrTrrr(uCSIsCombiningDiacriticalMarksforSymbols rYrcCrU)zKCheck whether the character is part of CombiningHalfMarks UCS Block )rBxmlUCSIsCombiningHalfMarksrTrrruCSIsCombiningHalfMarks rYrcCrU)zQCheck whether the character is part of CombiningMarksforSymbols UCS Block )rB xmlUCSIsCombiningMarksforSymbolsrTrrruCSIsCombiningMarksforSymbols rYrcCrU)zHCheck whether the character is part of ControlPictures UCS Block )rBxmlUCSIsControlPicturesrTrrruCSIsControlPictures rYrcCrU)zHCheck whether the character is part of CurrencySymbols UCS Block )rBxmlUCSIsCurrencySymbolsrTrrruCSIsCurrencySymbols rYrcCrU)zICheck whether the character is part of CypriotSyllabary UCS Block )rBxmlUCSIsCypriotSyllabaryrTrrruCSIsCypriotSyllabary rYrcCrU)z:Check whether the character is part of Cyrillic UCS Block )rBxmlUCSIsCyrillicrTrrr uCSIsCyrillic r\rcCrU)zKCheck whether the character is part of CyrillicSupplement UCS Block )rBxmlUCSIsCyrillicSupplementrTrrruCSIsCyrillicSupplement rYrcCrU)z9Check whether the character is part of Deseret UCS Block )rBxmlUCSIsDeseretrTrrr uCSIsDeseret r\rcCrU)zcCrU)z;Check whether the character is part of Malayalam UCS Block )rBxmlUCSIsMalayalamrTrrruCSIsMalayalam r\r@cCrU)zXCheck whether the character is part of MathematicalAlphanumericSymbols UCS Block )rB'xmlUCSIsMathematicalAlphanumericSymbolsrTrrr$uCSIsMathematicalAlphanumericSymbols rYrBcCrU)zNCheck whether the character is part of MathematicalOperators UCS Block )rBxmlUCSIsMathematicalOperatorsrTrrruCSIsMathematicalOperators rYrDcCrU)z[Check whether the character is part of MiscellaneousMathematicalSymbols-A UCS Block )rB)xmlUCSIsMiscellaneousMathematicalSymbolsArTrrr&uCSIsMiscellaneousMathematicalSymbolsA rYrFcCrU)z[Check whether the character is part of MiscellaneousMathematicalSymbols-B UCS Block )rB)xmlUCSIsMiscellaneousMathematicalSymbolsBrTrrr&uCSIsMiscellaneousMathematicalSymbolsB rYrHcCrU)zMCheck whether the character is part of MiscellaneousSymbols UCS Block )rBxmlUCSIsMiscellaneousSymbolsrTrrruCSIsMiscellaneousSymbols rYrJcCrU)zVCheck whether the character is part of MiscellaneousSymbolsandArrows UCS Block )rB%xmlUCSIsMiscellaneousSymbolsandArrowsrTrrr"uCSIsMiscellaneousSymbolsandArrows rYrLcCrU)zOCheck whether the character is part of MiscellaneousTechnical UCS Block )rBxmlUCSIsMiscellaneousTechnicalrTrrruCSIsMiscellaneousTechnical rYrNcCrU)z;Check whether the character is part of Mongolian UCS Block )rBxmlUCSIsMongolianrTrrruCSIsMongolian r\rPcCrU)zGCheck whether the character is part of MusicalSymbols UCS Block )rBxmlUCSIsMusicalSymbolsrTrrruCSIsMusicalSymbols rYrRcCrU)z9Check whether the character is part of Myanmar UCS Block )rBxmlUCSIsMyanmarrTrrr uCSIsMyanmar r\rTcCrU)z=Check whether the character is part of NumberForms UCS Block )rBxmlUCSIsNumberFormsrTrrruCSIsNumberForms r\rVcCrU)z7Check whether the character is part of Ogham UCS Block )rB xmlUCSIsOghamrTrrr uCSIsOgham r\rXcCrU)z;Check whether the character is part of OldItalic UCS Block )rBxmlUCSIsOldItalicrTrrruCSIsOldItalic r\rZcCrU)zTCheck whether the character is part of OpticalCharacterRecognition UCS Block )rB#xmlUCSIsOpticalCharacterRecognitionrTrrr uCSIsOpticalCharacterRecognition rYr\cCrU)z7Check whether the character is part of Oriya UCS Block )rB xmlUCSIsOriyarTrrr uCSIsOriya r\r^cCrU)z9Check whether the character is part of Osmanya UCS Block )rBxmlUCSIsOsmanyarTrrr uCSIsOsmanya r\r`cCrU)zKCheck whether the character is part of PhoneticExtensions UCS Block )rBxmlUCSIsPhoneticExtensionsrTrrruCSIsPhoneticExtensions rYrbcCrU)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)rNcC,t|dkr td||_tj||ddS)Nrz'xmlNode got a wrong wrapper object typer)r TypeErrorr,rrr-rrrr zxmlNode.__init__cCd|jtt|fS)Nzr_intrr"rrr__repr__ zxmlNode.__repr__cC&t|j}|dur dSt|d}|SzGet the namespace of a node Nr)rB xmlNodeGetNsr,rrr: _xmlNode__tmprrrns    z xmlNode.nscCrr)rBxmlNodeGetNsDefsr,rrrrrnsDefs rzxmlNode.nsDefscCt||j|dS)zIDumps debug information for the element node, it is recursive N)rBxmlDebugDumpNoder,rrdepthrrr debugDumpNode zxmlNode.debugDumpNodecCr)zQDumps debug information for the list of element node, it is recursive N)rBxmlDebugDumpNodeListr,rrrrdebugDumpNodeList rzxmlNode.debugDumpNodeListcCr)zMDumps debug information for the element node, it is not recursive N)rBxmlDebugDumpOneNoder,rrrrdebugDumpOneNode rzxmlNode.debugDumpOneNodecCr)zCount the children of @node. )rBxmlLsCountNoder,rrrr lsCountNode rzxmlNode.lsCountNodecCt||jdS)z,Dump to @output the type and name of @node. N)rB xmlLsOneNoder,rrrrr lsOneNode zxmlNode.lsOneNodecCt|jdS)zPrint node to the output FILE N)rBxmlShellPrintNoder,r"rrrshellPrintNode rzxmlNode.shellPrintNodecC@|durd}n|j}t|j|}|durtdt|d}|S)a9Add 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. NzxmlAddChild() failedr)r,rB xmlAddChildrrrrccur__or:rrrraddChild  zxmlNode.addChildcCr)zyAdd a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed) NzxmlAddChildList() failedr)r,rBxmlAddChildListrrrrrr addChildList  zxmlNode.addChildListcCt|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)rBxmlNodeAddContentr,rdrrr addContent! zxmlNode.addContentcCr)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)rBxmlNodeAddContentLenr,rrer9rrr addContentLen( rzxmlNode.addContentLencCr)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. NzxmlAddNextSibling() failedr)r,rBxmlAddNextSiblingrrrroelem__or:rrrraddNextSibling/  zxmlNode.addNextSiblingcCr)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. NzxmlAddPrevSibling() failedr)r,rBxmlAddPrevSiblingrrrrrraddPrevSibling=  zxmlNode.addPrevSiblingcCr)zAdd 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. NzxmlAddSibling() failedr)r,rB xmlAddSiblingrrrrrr addSiblingL  zxmlNode.addSiblingcC,t|j|}|durtdt|d}|S)zDo a copy of the node. NzxmlCopyNode() failedr)rB xmlCopyNoder,rr)rextendedr:rrrrcopyNodeX  zxmlNode.copyNodecC*t|j}|durtdt|d}|S)zqDo a recursive copy of the node list. Use xmlDocCopyNodeList() if possible to ensure string interning. NzxmlCopyNodeList() failedr)rBxmlCopyNodeListr,rrrrrr copyNodeList_   zxmlNode.copyNodeListcCrzDo a copy of the attribute. NzxmlCopyProp() failedrr,rB xmlCopyProprrrrrrcopyPropg  zxmlNode.copyPropcCrz Do a copy of an attribute list. NzxmlCopyPropList() failedrr,rBxmlCopyPropListrrrrrr copyPropListp rzxmlNode.copyPropListcCB|durd}n|j}t|j||}|durtdt|d}|Sz+Do a copy of the node to a given document. NzxmlDocCopyNode() failedrr,rBxmlDocCopyNoderr)rrrdoc__or:rrrr docCopyNodey  zxmlNode.docCopyNodecC@|durd}n|j}t||j}|durtdt|d}|Sz&Do a recursive copy of the node list. NzxmlDocCopyNodeList() failedrr,rBxmlDocCopyNodeListrrrrrr:rrrrdocCopyNodeList rzxmlNode.docCopyNodeListcCs<|durd}n|j}t||j}|durdSt|d}|SzvSet the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...). Nrr,rBxmlDocSetRootElementrrrrrdocSetRootElement   zxmlNode.docSetRootElementcCr)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. Nr)rBxmlFirstElementChildr,rrrrrfirstElementChild    zxmlNode.firstElementChildcCr)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)rB xmlFreeNoder,r"rrrfreeNode zxmlNode.freeNodecCr)zlFree a node and all its siblings, this is a recursive behaviour, all the children are freed too. N)rBxmlFreeNodeListr,r"rrr freeNodeList zxmlNode.freeNodeListcC&|durd}n|j}t||j}|SaSearches 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 Nr,rBxmlNodeGetBaserrrr:rrrgetBase zxmlNode.getBasecCr)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. rrrrrr  zxmlNode.getContentcCr)zSearches the language of a node, i.e. the values of the xml:lang attribute or the one carried by the nearest ancestor. )rBxmlNodeGetLangr,rrrrgetLang  zxmlNode.getLangcCr)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. )rBxmlNodeGetSpacePreserver,rrrrgetSpacePreserve rzxmlNode.getSpacePreservecCs*t|j||}|durdSt|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. Nr)rB xmlHasNsPropr,r)rr_ nameSpacer:rrrr hasNsProp s  zxmlNode.hasNsPropcCr)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. Nr)rB xmlHasPropr,r)rr_r:rrrrhasProp s  zxmlNode.hasPropcCr)zgChecks whether this node is an empty or whitespace only (and possibly ignorable) text-node. )rBxmlIsBlankNoder,rrrr isBlankNode rzxmlNode.isBlankNodecCr)zIs this node a Text node ? )rB xmlNodeIsTextr,rrrrisText rzxmlNode.isTextcCr)z!Search the last child of a node. NzxmlGetLastChild() failedr)rBxmlGetLastChildr,rrrrrr lastChild   zxmlNode.lastChildcCr)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. Nr)rBxmlLastElementChildr,rrrrrlastElementChild r zxmlNode.lastElementChildcCr)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 )rB xmlGetLineNor,rrrrlineNo rzxmlNode.lineNocC(|durd}n|j}t||j|}|SzBuilds 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. Nr,rBxmlNodeListGetRawStringrrinLinerr:rrrlistGetRawString zxmlNode.listGetRawStringcCr0zlBuild the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs Nr,rBxmlNodeListGetStringr4rrr listGetString zxmlNode.listGetStringcCD|durd}n|j}t|j|||}|durtdt|d}|SaQCreation 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() failedrr,rB xmlNewChildrrrrr_rens__or:rrrrnewChild   zxmlNode.newChildcC.t|j||}|durtdt|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() failedr)rBxmlNewNsr,rr)rrrr:rrrrnewNs* s z xmlNode.newNscCr=PCreate a new property tagged with a namespace and carried by a node. NzxmlNewNsProp() failedrr,rB xmlNewNsProprrrrr_rrBr:rrrr newNsProp6  zxmlNode.newNsPropcCr=rINzxmlNewNsPropEatName() failedrr,rBxmlNewNsPropEatNamerrrLrrrnewNsPropEatName@ rNzxmlNode.newNsPropEatNamecCrE)z)Create a new property carried by a node. NzxmlNewProp() failedr)rB xmlNewPropr,rrrr_rr:rrrrnewPropJ  zxmlNode.newPropcCr=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() failedrr,rBxmlNewTextChildrrrArrr newTextChildQ   zxmlNode.newTextChildcCr)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. Nr)rBxmlNextElementSiblingr,rrrrrnextElementSiblingd r zxmlNode.nextElementSiblingcCt|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. )rBxmlGetNoNsPropr,rr_r:rrrnoNsPropo zxmlNode.noNsPropcCr)z0Build a structure based Path for the given node )rBxmlGetNodePathr,rrrrnodePathy rzxmlNode.nodePathcCt|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. )rB xmlGetNsPropr,)rr_r!r:rrrnsProp~ szxmlNode.nsPropcCr)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. Nr)rBxmlPreviousElementSiblingr,rrrrrpreviousElementSibling r zxmlNode.previousElementSiblingcCr^)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. )rB xmlGetPropr,r`rrrprop sz xmlNode.propcCra!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. Nr,rBxmlReconciliateNsrrrrreconciliateNs  zxmlNode.reconciliateNscCr)zUnlink 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. NzxmlReplaceNode() failedr)r,rBxmlReplaceNoderrrrrr replaceNode  zxmlNode.replaceNodecCB|durd}n|j}t||j|}|durtdt|d}|SaSearch 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() failedrr,rB xmlSearchNsrr)rrr!rr:rrrrsearchNs  zxmlNode.searchNscCrtzSearch a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return None otherwise. NzxmlSearchNsByHref() failedrr,rBxmlSearchNsByHrefrr)rrrrr:rrrrsearchNsByHref  zxmlNode.searchNsByHrefcCr)z\Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute. N)rBxmlNodeSetBaser,rrrrsetBase rzxmlNode.setBasecCra 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)rBxmlNodeSetContentr,rdrrr setContent rzxmlNode.setContentcCrr)rBxmlNodeSetContentLenr,rrrr setContentLen rzxmlNode.setContentLencCr)zRSet the language of a node, i.e. the values of the xml:lang attribute. N)rBxmlNodeSetLangr,)rrhrrrsetLang rzxmlNode.setLangcC&|durd}n|j}t|j|dSzr ctx__or:rrr xpathNodeEvals zxmlNode.xpathNodeEvalcC$t|j}|durtdt|S)zfCreate a new xmlXPathObjectPtr of type NodeSet and initialize it with the single Node @val NzxmlXPathNewNodeSet() failed)rBxmlXPathNewNodeSetr,r)rrrrrxpathNewNodeSet zxmlNode.xpathNewNodeSetcCr)znCreate a new xmlXPathObjectPtr of type Value Tree (XSLT) and initialize it with the tree root @val NzxmlXPathNewValueTree() failed)rBxmlXPathNewValueTreer,r)rrrrrxpathNewValueTreerzxmlNode.xpathNewValueTreecCraTraversal function for the "ancestor" direction the ancestor axis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent's parent and so on; the nodes are ordered in reverse document order; thus the parent is the first node on the axis, and the parent's parent is the second node on the axis NzxmlXPathNextAncestor() failedrr,rBxmlXPathNextAncestorr)rrrrr:rrrrxpathNextAncestorrzxmlNode.xpathNextAncestorcCrasTraversal function for the "ancestor-or-self" direction he ancestor-or-self axis contains the context node and ancestors of the context node in reverse document order; thus the context node is the first node on the axis, and the context node's parent the second; parent here is defined the same as with the parent axis. Nz#xmlXPathNextAncestorOrSelf() failedrr,rBxmlXPathNextAncestorOrSelfr)rrrrrxpathNextAncestorOrSelfrzxmlNode.xpathNextAncestorOrSelfcCrzkTraversal function for the "attribute" direction TODO: support DTD inherited default attributes NzxmlXPathNextAttribute() failedrr,rBxmlXPathNextAttributer)rrrrrxpathNextAttributerzxmlNode.xpathNextAttributecCrzTraversal function for the "child" direction The child axis contains the children of the context node in document order. NzxmlXPathNextChild() failedrr,rBxmlXPathNextChildr)rrrrrxpathNextChildrzxmlNode.xpathNextChildcCrzTraversal function for the "descendant" direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on. NzxmlXPathNextDescendant() failedrr,rBxmlXPathNextDescendantr)rrrrrxpathNextDescendantrzxmlNode.xpathNextDescendantcCraZTraversal function for the "descendant-or-self" direction the descendant-or-self axis contains the context node and the descendants of the context node in document order; thus the context node is the first node on the axis, and the first child of the context node is the second node on the axis Nz%xmlXPathNextDescendantOrSelf() failedrr,rBxmlXPathNextDescendantOrSelfr)rrrrrxpathNextDescendantOrSelfrz!xmlNode.xpathNextDescendantOrSelfcCra[Traversal function for the "following" direction The following axis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes; the nodes are ordered in document order NzxmlXPathNextFollowing() failedrr,rBxmlXPathNextFollowingr)rrrrrxpathNextFollowingrzxmlNode.xpathNextFollowingcCrzTraversal function for the "following-sibling" direction The following-sibling axis contains the following siblings of the context node in document order. Nz%xmlXPathNextFollowingSibling() failedrr,rBxmlXPathNextFollowingSiblingr)rrrrrxpathNextFollowingSiblingrsz!xmlNode.xpathNextFollowingSiblingcCraYTraversal function for the "namespace" direction the namespace axis contains the namespace nodes of the context node; the order of nodes on this axis is implementation-defined; the axis will be empty unless the context node is an element We keep the XML namespace node at the end of the list. NzxmlXPathNextNamespace() failedrr,rBxmlXPathNextNamespacer)rrrrrxpathNextNamespacerzxmlNode.xpathNextNamespacecCrzTraversal function for the "parent" direction The parent axis contains the parent of the context node, if there is one. NzxmlXPathNextParent() failedrr,rBxmlXPathNextParentr)rrrrrxpathNextParent rszxmlNode.xpathNextParentcCrabTraversal function for the "preceding" direction the preceding axis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes; the nodes are ordered in reverse document order NzxmlXPathNextPreceding() failedrr,rBxmlXPathNextPrecedingr)rrrrrxpathNextPreceding+rzxmlNode.xpathNextPrecedingcCraCTraversal function for the "preceding-sibling" direction The preceding-sibling axis contains the preceding siblings of the context node in reverse document order; the first preceding sibling is first on the axis; the sibling preceding that node is the second on the axis and so on. Nz%xmlXPathNextPrecedingSibling() failedrr,rBxmlXPathNextPrecedingSiblingr)rrrrrxpathNextPrecedingSibling9rz!xmlNode.xpathNextPrecedingSiblingcCrzkTraversal function for the "self" direction The self axis contains just the context node itself NzxmlXPathNextSelf() failedrr,rBxmlXPathNextSelfr)rrrrr xpathNextSelfFrzxmlNode.xpathNextSelfcCr)zMCreate a new xmlXPathObjectPtr of type range using a single nodes Nz!xmlXPtrNewCollapsedRange() failed)rBxmlXPtrNewCollapsedRanger,rrrrrrxpointerNewCollapsedRangeTrz!xmlNode.xpointerNewCollapsedRangecCsV|durd}n|j}|durd}n|j}t||j|}|dur$tdt|d}|SzCreate a new XPointer context NzxmlXPtrNewContext() failedrr,rBxmlXPtrNewContextr xpathContext)rroriginr origin__or:rrrrxpointerNewContext[ zxmlNode.xpointerNewContextcC:|durd}n|j}t|j|}|durtdt|S)zCreate a new xmlXPathObjectPtr of type LocationSet and initialize it with the single range made of the two nodes @start and @end Nz#xmlXPtrNewLocationSetNodes() failed)r,rBxmlXPtrNewLocationSetNodesrrrendend__or:rrrxpointerNewLocationSetNodesfs z#xmlNode.xpointerNewLocationSetNodescCs>|durd}n|j}t|j|||}|durtdt|S)z-Create a new xmlXPathObjectPtr of type range NzxmlXPtrNewRange() failed)r,rBxmlXPtrNewRangerr)r startindexr(endindexr)r:rrrxpointerNewRangeps zxmlNode.xpointerNewRangecCr%)z;Create a new xmlXPathObjectPtr of type range using 2 nodes NzxmlXPtrNewRangeNodes() failed)r,rBxmlXPtrNewRangeNodesrrr'rrrxpointerNewRangeNodesxs zxmlNode.xpointerNewRangeNodesr)irrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrr"r$r&r(r*r-r/r6r;rCrGrMrRrUrZr]rardrgrirkrorrrxr}rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrr#r*r.r0rrrrr 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)rNcCr)Nrz&xmlDoc got a wrong wrapper object typerrrr,rrr-rrrrrzxmlDoc.__init__cCr)Nzrr"rrrrrzxmlDoc.__repr__cCre)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. )rBhtmlAutoCloseTagr,)rr_ror:rrrr2rzxmlDoc.htmlAutoCloseTagcCr^)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 )rBhtmlIsAutoClosedr,)rror:rrrr3zxmlDoc.htmlIsAutoClosedcCs*|durd}n|j}t||j||dSzDump an HTML document. Nr,rBhtmlDocContentDumpFormatOutput)rbufrrbuf__orrrr7z%xmlDoc.htmlDocContentDumpFormatOutputcCs(|durd}n|j}t||j|dSz;Dump an HTML document. Formatting return/spaces are added. Nr,rBhtmlDocContentDumpOutput)rr8rr9rrrr=zxmlDoc.htmlDocContentDumpOutputcCt||j}|S)z'Dump an HTML document to an open FILE. )rB htmlDocDumpr,rrr:rrrr@rmzxmlDoc.htmlDocDumpcCr)z,Encoding definition lookup in the Meta tags )rBhtmlGetMetaEncodingr,rrrrrBrzxmlDoc.htmlGetMetaEncodingcC(|durd}n|j}t||j|dS)znDump an HTML node, recursive behaviour,children are printed too, and formatting returns are added. N)r,rBhtmlNodeDumpFile)rrrcrrrrrDzxmlDoc.htmlNodeDumpFilecCs,|durd}n|j}t||j|||}|S)zDump an HTML node, recursive behaviour,children are printed too. TODO: if encoding == None try to save in the doc encoding N)r,rBhtmlNodeDumpFileFormat)rrrcrrrr:rrrrFszxmlDoc.htmlNodeDumpFileFormatcCs@|durd}n|j}|durd}n|j}t||j|||dSzLDump an HTML node, recursive behaviour,children are printed too. Nr,rBhtmlNodeDumpFormatOutput)rr8rcrrr9rrrrrI zxmlDoc.htmlNodeDumpFormatOutputcCs>|durd}n|j}|durd}n|j}t||j||dSzuDump an HTML node, recursive behaviour,children are printed too, and formatting returns/spaces are added. Nr,rBhtmlNodeDumpOutput)rr8rcrr9rrrrrM zxmlDoc.htmlNodeDumpOutputcCr?)zYDump an HTML document to a file. If @filename is "-" the stdout file is used. )rB htmlSaveFiler,rrfr:rrrrOrPzxmlDoc.htmlSaveFilecCt||j|}|S)zkDump an HTML document to a file using a given encoding and formatting returns/spaces are added. )rBhtmlSaveFileEncr,rrfrr:rrrrRrzxmlDoc.htmlSaveFileEnccCt||j||}|S)z8Dump an HTML document to a file using a given encoding. )rBhtmlSaveFileFormatr,rrfrrr:rrrrUzxmlDoc.htmlSaveFileFormatcCr^)zSets the current encoding in the Meta tags NOTE: this will not change the document content encoding, just the META flag associated. )rBhtmlSetMetaEncodingr,)rrr:rrrrXr4zxmlDoc.htmlSetMetaEncodingcCr?)z_Check the document for potential content problems, and output the errors to @output )rBxmlDebugCheckDocumentr,)rrr:rrrdebugCheckDocumentrPzxmlDoc.debugCheckDocumentcCr)z9Dumps debug information for the document, it's recursive N)rBxmlDebugDumpDocumentr,rrrrdebugDumpDocumentrzxmlDoc.debugDumpDocumentcCr)zJDumps debug information concerning the document, not recursive N)rBxmlDebugDumpDocumentHeadr,rrrrdebugDumpDocumentHeadrzxmlDoc.debugDumpDocumentHeadcCr)zODumps debug information for all the entities in use by the document N)rBxmlDebugDumpEntitiesr,rrrrdebugDumpEntitiesrzxmlDoc.debugDumpEntitiescC4t|j|||||}|durtdt|d}|S)z)Register a new entity for this document. NzxmlAddDocEntity() failedr)rBxmlAddDocEntityr,rrrr_r rrIrer: _xmlDoc__tmprrr addDocEntity  zxmlDoc.addDocEntitycCra)z=Register a new entity for this document DTD external subset. NzxmlAddDtdEntity() failedr)rBxmlAddDtdEntityr,rrrcrrr addDtdEntityrfzxmlDoc.addDtdEntitycCr)z:Do an entity lookup in the document entity hash table and NzxmlGetDocEntity() failedr)rBxmlGetDocEntityr,rrrr_r:rdrrr docEntityrzxmlDoc.docEntitycCr)z5Do an entity lookup in the DTD entity hash table and NzxmlGetDtdEntity() failedr)rBxmlGetDtdEntityr,rrrjrrr dtdEntity!rzxmlDoc.dtdEntitycCr^)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. )rBxmlEncodeEntitiesr,rr:r:rrrencodeEntities(rzxmlDoc.encodeEntitiescCr^)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. )rBxmlEncodeEntitiesReentrantr,rorrrencodeEntitiesReentrant0rzxmlDoc.encodeEntitiesReentrantcCr^)zDo a global encoding of a string, replacing the predefined entities this routine is reentrant, and result must be deallocated. )rBxmlEncodeSpecialCharsr,rorrrencodeSpecialChars8r4zxmlDoc.encodeSpecialCharscCra)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() failedr)rB xmlNewEntityr,rrrcrrr newEntity?s zxmlDoc.newEntitycCr)z=Do an entity lookup in the internal and external subsets and NzxmlGetParameterEntity() failedr)rBxmlGetParameterEntityr,rrrjrrrparameterEntityKrzxmlDoc.parameterEntitycCr)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() failedr)rBxmlRelaxNGNewDocParserCtxtr,r'rrr:rdrrrrelaxNGNewDocParserCtxtV  zxmlDoc.relaxNGNewDocParserCtxtcCrz$Validate a document tree in memory. Nr,rBxmlRelaxNGValidateDocrrrrrelaxNGValidateDoc`rzxmlDoc.relaxNGValidateDoccCrzValidate a full subtree when xmlRelaxNGValidatePushElement() returned 0 and the content of the node has been expanded. Nr,rBxmlRelaxNGValidateFullElementrrrorrr:rrrrelaxNGValidateFullElementgrz!xmlDoc.relaxNGValidateFullElementcCrz7Pop the element end from the RelaxNG validation stack. Nr,rBxmlRelaxNGValidatePopElementrrrrrelaxNGValidatePopElementr z xmlDoc.relaxNGValidatePopElementcCrz:Push a new element start on the RelaxNG validation stack. Nr,rBxmlRelaxNGValidatePushElementrrrrrelaxNGValidatePushElement{rz!xmlDoc.relaxNGValidatePushElementcCr)zDo a copy of the document info. If recursive, the content tree will be copied too as well as DTD, namespaces and entities. NzxmlCopyDoc() failedr)rB xmlCopyDocr,rr)r recursiver:rdrrrcopyDocs zxmlDoc.copyDoccCrtrr)rrrnode__or:rdrrrrrzxmlDoc.copyNodecCrrr)rrrr:rdrrrrrzxmlDoc.copyNodeListcC0t|j|||}|durtdt|d}|S)z)Create the internal subset of a document NzxmlCreateIntSubset() failedr)rBxmlCreateIntSubsetr,rrrr_rrIr:rdrrrcreateIntSubsets zxmlDoc.createIntSubsetcCr)z5get the compression ratio for a document, ZLIB based )rBxmlGetDocCompressModer,rrrrdocCompressModerzxmlDoc.docCompressModecCr?z&Dump an XML document to an open FILE. )rB xmlDocDumpr,rArrrdumprmz xmlDoc.dumpcCrC)zQDump an XML/HTML node, recursive behaviour, children are printed too. N)r,rB xmlElemDump)rrrcrrrrelemDumprEzxmlDoc.elemDumpcCrQr)rBxmlDocFormatDumpr,)rrrr:rrr formatDumpzxmlDoc.formatDumpcCr)zIFree up all the structures used by a document, tree included. N)rBrr,r"rrrfreeDocrzxmlDoc.freeDoccCr)zvGet the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...). NzxmlDocGetRootElement() failedr)rBxmlDocGetRootElementr,rrrzrrrgetRootElementrzxmlDoc.getRootElementcCr)z&Get the internal subset of a document NzxmlGetIntSubset() failedr)rBxmlGetIntSubsetr,rrrzrrr intSubsetr+zxmlDoc.intSubsetcCrE)z1Creation of a new node containing a CDATA block. NzxmlNewCDataBlock() failedr)rBxmlNewCDataBlockr,rrrrer9r:rdrrr newCDataBlockrVzxmlDoc.newCDataBlockcCr)z,Creation of a new character reference node. NzxmlNewCharRef() failedr)rB xmlNewCharRefr,rrrjrrr newCharRefrzxmlDoc.newCharRefcCr)zJCreation of a new node containing a comment within a document. NzxmlNewDocComment() failedr)rBxmlNewDocCommentr,rrrrer:rdrrr newDocComment zxmlDoc.newDocCommentcCr)z!Creation of a new Fragment node. NzxmlNewDocFragment() failedr)rBxmlNewDocFragmentr,rrrzrrrnewDocFragmentr+zxmlDoc.newDocFragmentcCr=tCreation 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() failedrr,rB xmlNewDocNoderrrrr_rerBr:rdrrr newDocNode  zxmlDoc.newDocNodecCr=rNzxmlNewDocNodeEatName() failedrr,rBxmlNewDocNodeEatNamerrrrrrnewDocNodeEatNamerzxmlDoc.newDocNodeEatNamecCrE)z.Creation of a processing instruction element. NzxmlNewDocPI() failedr)rB xmlNewDocPIr,rr)rr_rer:rdrrrnewDocPI rVzxmlDoc.newDocPIcCrE)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() failedr)rB xmlNewDocPropr,rr)rr_rr:rdrrr newDocProps zxmlDoc.newDocPropcCr=zcCreation of a new node element within a document. @ns and @content are optional (None). NzxmlNewDocRawNode() failedrr,rBxmlNewDocRawNoderrrrrr newDocRawNoderNzxmlDoc.newDocRawNodecCr)z/Creation of a new text node within a document. NzxmlNewDocText() failedr)rB xmlNewDocTextr,rrrrrr newDocText)rzxmlDoc.newDocTextcCrE)zzCreation of a new text node with an extra content length parameter. The text node pertain to a given document. NzxmlNewDocTextLen() failedr)rBxmlNewDocTextLenr,rrrrrr newDocTextLen0 zxmlDoc.newDocTextLencCr)zrCreation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset(). NzxmlNewDtd() failedr)rB xmlNewDtdr,rrrrrrnewDtd8 z xmlDoc.newDtdcCrE)z\Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! NzxmlNewGlobalNs() failedr)rBxmlNewGlobalNsr,rr)rrrr:rdrrr newGlobalNs@rzxmlDoc.newGlobalNscCr)z"Creation of a new reference node. NzxmlNewReference() failedr)rBxmlNewReferencer,rrrjrrr newReferenceHrzxmlDoc.newReferencecCsB|durd}n|j}|durd}n|j}t||j||||dSzDump 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 Nr,rBxmlNodeDumpOutput)rr8rcrrrr9rrrrnodeDumpOutputO zxmlDoc.nodeDumpOutputcCrrr)rrcrr:rrr nodeGetBaseZrzxmlDoc.nodeGetBasecCrr1r2rrr5list__or:rrrnodeListGetRawStringfr7zxmlDoc.nodeListGetRawStringcCrr8r9rrrrnodeListGetStringpr<zxmlDoc.nodeListGetStringcCrrlrm)rtreetree__or:rrrroxrpzxmlDoc.reconciliateNscCr?)zDump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. )rB xmlSaveFiler,rPrrrsaveFiler4zxmlDoc.saveFilecCrQ)z:Dump an XML document, converting it to the given encoding )rBxmlSaveFileEncr,rSrrr saveFileEncrzxmlDoc.saveFileEnccCr0zDump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call. Nr,rB xmlSaveFileTo)rr8rr9r:rrr saveFileTozxmlDoc.saveFileTocCrQ)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 )rBxmlSaveFormatFiler,)rrfrr:rrrsaveFormatFileszxmlDoc.saveFormatFilecCrT)z*Dump an XML document to a file or an URL. )rBxmlSaveFormatFileEncr,rVrrrsaveFormatFileEncrWzxmlDoc.saveFormatFileEnccCrrr,rBxmlSaveFormatFileTo)rr8rrr9r:rrrsaveFormatFileTozxmlDoc.saveFormatFileTocCrrurv)rrr!rr:rdrrrrxryzxmlDoc.searchNscCrrzr{)rrrrr:rdrrrr}r~zxmlDoc.searchNsByHrefcCr)zxset the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression) N)rBxmlSetDocCompressModer,)rrrrrsetDocCompressModerzxmlDoc.setDocCompressModecC&|durd}n|j}t||jdSrr)rrrrrrrrzxmlDoc.setListDoccCs<|durd}n|j}t|j|}|durdSt|d}|Srr)rrootroot__or:rdrrrsetRootElementr zxmlDoc.setRootElementcCrrr)rrrrrrrrzxmlDoc.setTreeDoccCr)Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs. NzxmlStringGetNodeList() failedr)rBxmlStringGetNodeListr,rr)rrr:rdrrrstringGetNodeListrzxmlDoc.stringGetNodeListcCrE)rNz xmlStringLenGetNodeList() failedr)rBxmlStringLenGetNodeListr,rr)rrr9r:rdrrrstringLenGetNodeListrzxmlDoc.stringLenGetNodeListcCr)z,Search the attribute declaring the given ID NzxmlGetID() failedr)rBxmlGetIDr,rr)rrqr:rdrrrrqrz xmlDoc.IDcC<|durd}n|j}|durd}n|j}t|j||}|Srrrrorrrr:rrrrrz xmlDoc.isIDcCr^)zSearch in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs )rBxmlIsMixedElementr,r`rrrisMixedElementrPzxmlDoc.isMixedElementcCrrrrrrrrrz xmlDoc.isRefcCrzORemove the given attribute from the ID table maintained internally. Nr,rB xmlRemoveIDrrrr:rrrremoveID"zxmlDoc.removeIDcCrzPRemove the given attribute from the Ref table maintained internally. Nr,rB xmlRemoveRefrrrr removeRef*rzxmlDoc.removeRefcCs@|durd}n|j}|durd}n|j}t||j|||}|SaDoes 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 Nr,rB#xmlValidCtxtNormalizeAttributeValue)rrror_rrrr:rrr validCtxtNormalizeAttributeValue2  z'xmlDoc.validCtxtNormalizeAttributeValuecC*|durd}n|j}t|j|||}|Srr)rror_rrr:rrrrBrz#xmlDoc.validNormalizeAttributeValuecCrzTry 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. Nr,rBxmlValidateDocumentrrrrvalidateDocumentNzxmlDoc.validateDocumentcCraDoes 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 Nr,rBxmlValidateDocumentFinalrrrrvalidateDocumentFinalXzxmlDoc.validateDocumentFinalcCraTry 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. Nr,rBxmlValidateDtd)rrrrdtd__or:rrr validateDtdc zxmlDoc.validateDtdcCraDoes 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. Nr,rBxmlValidateDtdFinalrrrrvalidateDtdFinalpzxmlDoc.validateDtdFinalcCrz-Try to validate the subtree under an element Nr,rBxmlValidateElementrrrrvalidateElement}rzxmlDoc.validateElementcCr0zbValidate that the given name match a notation declaration. - [ VC: Notation Declared ] Nr,rBxmlValidateNotationUse)rrrvrr:rrrvalidateNotationUser<zxmlDoc.validateNotationUsec CsT|durd}n|j}|durd}n|j}|durd}n|j}t||j|||}|SaTry 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 Nr,rBxmlValidateOneAttribute) rrrorrrrrr:rrrvalidateOneAttributezxmlDoc.validateOneAttributecCra]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 Nr,rBxmlValidateOneElementrrrrvalidateOneElement zxmlDoc.validateOneElementc CsV|durd}n|j}|durd}n|j}|durd}n|j}t||j||||} | SaTry 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 Nr,rBxmlValidateOneNamespace) rrrorrrrrrBr:rrrvalidateOneNamespacezxmlDoc.validateOneNamespacecC>|durd}n|j}|durd}n|j}t||j||}|Sz/Pop the element end from the validation stack. Nr,rBxmlValidatePopElementrrroqnamerrr:rrrvalidatePopElement zxmlDoc.validatePopElementcCr9z2Push a new element start on the validation stack. Nr,rBxmlValidatePushElementr=rrrvalidatePushElementr@zxmlDoc.validatePushElementcCrzTry 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 Nr,rBxmlValidateRootrrrr validateRootrzxmlDoc.validateRootcCrz=Implement the XInclude substitution on the XML document @doc )rBxmlXIncludeProcessr,rrrrxincludeProcessrzxmlDoc.xincludeProcesscCr^rI)rBxmlXIncludeProcessFlagsr,rrrrxincludeProcessFlagsrmzxmlDoc.xincludeProcessFlagscCrzuSetup an xmltextReader to parse a preparsed XML document. This reuses the existing @reader xmlTextReader. Nr,rBxmlReaderNewWalkerrreader reader__or:rrr NewWalkerrzxmlDoc.NewWalkercCr)z2Create an xmltextReader for a preparsed document. NzxmlReaderWalker() failedr)rBxmlReaderWalkerr,rrrzrrr readerWalkerr+zxmlDoc.readerWalkercCr)zCreate an XML Schemas parse context for that document. NB. The document may be modified during the parsing process. Nz"xmlSchemaNewDocParserCtxt() failedr)rBxmlSchemaNewDocParserCtxtr,r'r,rzrrrschemaNewDocParserCtxtrzxmlDoc.schemaNewDocParserCtxtcCrr}r,rBxmlSchemaValidateDocrrrrschemaValidateDocrzxmlDoc.schemaValidateDoccCr)zCreate a new xmlXPathContext NzxmlXPathNewContext() failedr)rBxmlXPathNewContextr,r)r rzrrrrr+zxmlDoc.xpathNewContextcCr)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. )rBxmlXPathOrderDocElemsr,rrrrxpathOrderDocElems zxmlDoc.xpathOrderDocElemscCsV|durd}n|j}|durd}n|j}t|j||}|dur$tdt|d}|Srr)rherer!here__or"r:rdrrrr#'r$zxmlDoc.xpointerNewContextr)nrrrrrr2r3r7r=r@rBrDrFrIrMrOrRrUrXrZr\r^r`rerhrkrmrprrrtrvrxr{rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrorrrrrrrxr}rrrrrrrqrrrrrr rrrrr r%r)r-r2r7r?rDrHrKrMrTrVrXr[rr^r#rrrrrs                                         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)rPNcC||_tj||ddSr)r,rrr-rrrr3zparserCtxt.__init__cCrrrr"rrrrE7rzparserCtxt.__del__cCr)z-Get the document tree from a parser context. NzxmlParserGetDoc() failedr)rBxmlParserGetDocr,r'rrr:_parserCtxt__tmprrrr=r+zparserCtxt.doccCr)z4Get the validity information from a parser context. )rBxmlParserGetIsValidr,rrrrisValidDrzparserCtxt.isValidcCr)zmyDoc is not freed. N)rBhtmlFreeParserCtxtr,r"rrrrrzparserCtxt.htmlFreeParserCtxtcCr)zcparse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' )rBhtmlParseCharRefr,rrrrrrzparserCtxt.htmlParseCharRefcCt|j|||}|SzParse a Chunk of memory )rBhtmlParseChunkr,rrrS terminater:rrrrrWzparserCtxt.htmlParseChunkcCr)zZparse an HTML document (and build a tree if using the standard SAX interface). )rBhtmlParseDocumentr,rrrrrrzparserCtxt.htmlParseDocumentcCr)zparse 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)rBhtmlParseElementr,r"rrrrzparserCtxt.htmlParseElementcCr)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. )rBxmlByteConsumedr,rrrr byteConsumedr_zparserCtxt.byteConsumedcCr)zMClear (release owned resources) and reinitialize a parser context N)rBxmlClearParserCtxtr,r"rrrclearParserCtxtrzparserCtxt.clearParserCtxtcCrw)rxNzxmlCtxtReadDoc() failedr)rBxmlCtxtReadDocr,rrrzrrr ctxtReadDocr{zparserCtxt.ctxtReadDoccCrw)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() failedr)rB xmlCtxtReadFdr,rrr}rrr ctxtReadFds zparserCtxt.ctxtReadFdcCr)r~NzxmlCtxtReadFile() failedr)rBxmlCtxtReadFiler,rrrrrr ctxtReadFilerzparserCtxt.ctxtReadFilecCra)rxNzxmlCtxtReadMemory() failedr)rBxmlCtxtReadMemoryr,rrrrrrctxtReadMemoryrzparserCtxt.ctxtReadMemorycCrr)rB xmlCtxtResetr,r"rrr ctxtResetrzparserCtxt.ctxtResetcCt|j||||}|S)zReset a push parser context )rBxmlCtxtResetPushr,)rrrSrfrr:rrr ctxtResetPushszparserCtxt.ctxtResetPushcCr^r)rBxmlCtxtUseOptionsr,rrrrctxtUseOptionsrmzparserCtxt.ctxtUseOptionscCr)zInitialize a parser context )rBxmlInitParserCtxtr,rrrrinitParserCtxtrzparserCtxt.initParserCtxtcCrr)rB xmlParseChunkr,rrrr parseChunkrWzparserCtxt.parseChunkcCr)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*)? )rBxmlParseDocumentr,rrrr parseDocumentrzparserCtxt.parseDocumentcCr)zparse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. [78] extParsedEnt ::= TextDecl? content )rBxmlParseExtParsedEntr,rrrrparseExtParsedEntrzparserCtxt.parseExtParsedEntcCr)zSetup 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)rBxmlSetupParserForBufferr,)rrRrfrrrsetupParserForBufferrzparserCtxt.setupParserForBuffercCr)z!Blocks further parser processing N)rB xmlStopParserr,r"rrr stopParserrzparserCtxt.stopParsercCt|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 ';' )rBxmlDecodeEntitiesr,)rr9whatr(end2end3r:rrrdecodeEntitieszparserCtxt.decodeEntitiescCrzDefault 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. Nr,rBxmlHandleEntity)rentity entity__orrr handleEntityzparserCtxt.handleEntitycCr)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 )rBxmlNamespaceParseNCNamer,rrrrnamespaceParseNCName&rzparserCtxt.namespaceParseNCNamecCr)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)? )rBxmlNamespaceParseNSDefr,rrrrnamespaceParseNSDef/rzparserCtxt.namespaceParseNSDefcCr)z"Skip to the next char input char. N)rB xmlNextCharr,r"rrrnextChar8rzparserCtxt.nextCharcCr)a 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. )rBxmlParseAttValuer,rrrr parseAttValue<s zparserCtxt.parseAttValuecCr)z: parse the Attribute list def for an element [52] AttlistDecl ::= '' [53] AttDef ::= S Name S AttType S DefaultDecl N)rBxmlParseAttributeListDeclr,r"rrrparseAttributeListDeclXrz!parserCtxt.parseAttributeListDeclcCr)zParse escaped pure raw content. [18] CDSect ::= CDStart CData CDEnd [19] CDStart ::= '' Char*)) [21] CDEnd ::= ']]>' N)rBxmlParseCDSectr,r"rrr parseCDSect^rzparserCtxt.parseCDSectcCr)aparse a CharData section. if we are within a CDATA section ']]>' marks an end of section. The right angle bracket (>) may be represented using the string ">", and must, for compatibility, be escaped using ">" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section. [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) N)rBxmlParseCharDatar,)rcdatarrr parseCharDatadzparserCtxt.parseCharDatacCr)zparse Reference declarations [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';' [ WFC: Legal Character ] Characters referred to using character references must match the production for Char. )rBxmlParseCharRefr,rrrr parseCharRefnrzparserCtxt.parseCharRefcCr)zSkip an XML (SGML) comment The spec says that "For compatibility, the string "--" (double-hyphen) must not occur within comments. " [15] Comment ::= '' N)rBxmlParseCommentr,r"rrr parseCommentvrzparserCtxt.parseCommentcCr)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)rBxmlParseDocTypeDeclr,r"rrrparseDocTypeDeclrzparserCtxt.parseDocTypeDeclcCr)zparse 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)rBxmlParseElementr,r"rrr parseElementrzparserCtxt.parseElementcCr)zparse an Element declaration. [45] elementdecl ::= '' [ VC: Unique Element Type Declaration ] No element type may be declared more than once )rBxmlParseElementDeclr,rrrrparseElementDeclrzparserCtxt.parseElementDeclcCr)zYparse the XML encoding name [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')* )rBxmlParseEncNamer,rrrr parseEncNamerzparserCtxt.parseEncNamecCr)zparse the XML encoding declaration [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' | "'" EncName "'") this setups the conversion filters. )rBxmlParseEncodingDeclr,rrrrparseEncodingDeclrzparserCtxt.parseEncodingDeclcCr)zrparse an end of tag [42] ETag ::= '' With namespace [NS 9] ETag ::= '' N)rBxmlParseEndTagr,r"rrr parseEndTagrzparserCtxt.parseEndTagcCr)aparse ' [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)rBxmlParseEntityDeclr,r"rrrparseEntityDeclszparserCtxt.parseEntityDeclcCr)aparse ENTITY references declarations [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() failedr)rBxmlParseEntityRefr,r'rrerrrparseEntityRefs  zparserCtxt.parseEntityRefcCr)zparse Markup declarations from an external subset [30] extSubset ::= textDecl? extSubsetDecl [31] extSubsetDecl ::= (markupdecl | conditionalSect | PEReference | S) * N)rBxmlParseExternalSubsetr,)rrrIrrrparseExternalSubsetszparserCtxt.parseExternalSubsetcCr)asparse Markup declarations [29] markupdecl ::= elementdecl | AttlistDecl | EntityDecl | NotationDecl | PI | Comment [ VC: Proper Declaration/PE Nesting ] Parameter-entity replacement text must be properly nested with markup declarations. That is to say, if either the first character or the last character of a markup declaration (markupdecl above) is contained in the replacement text for a parameter-entity reference, both must be contained in the same replacement text. [ WFC: PEs in Internal Subset ] In the internal DTD subset, parameter-entity references can occur only where markup declarations can occur, not within markup declarations. (This does not apply to references that occur in external parameter entities or to the external subset.) N)rBxmlParseMarkupDeclr,r"rrrparseMarkupDeclszparserCtxt.parseMarkupDeclcCr)zOparse an XML Misc* optional field. [27] Misc ::= Comment | PI | S N)rB xmlParseMiscr,r"rrr parseMiscrzparserCtxt.parseMisccCr)zparse an XML name. [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender [5] Name ::= (Letter | '_' | ':') (NameChar)* [6] Names ::= Name (#x20 Name)* )rB xmlParseNamer,rrrr parseNamerzparserCtxt.parseNamecCr)avxmlParseNamespace: parse specific PI '' Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral 'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S SystemLiteral See the NOTE on xmlParseExternalID(). N)rBxmlParseNotationDeclr,r"rrrparseNotationDeclrzparserCtxt.parseNotationDeclcCr)aparse PEReference declarations 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)rBxmlParsePEReferencer,r"rrrparsePEReference szparserCtxt.parsePEReferencecCr)zparse an XML Processing Instruction. [16] PI ::= '' Char*)))? '?>' The processing is transferred to SAX once parsed. N)rB xmlParsePIr,r"rrrparsePIrzparserCtxt.parsePIcCr)zbparse the name of a PI [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) )rBxmlParsePITargetr,rrrr parsePITarget#rzparserCtxt.parsePITargetcCr)znparse an XML public literal [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'" )rBxmlParsePubidLiteralr,rrrrparsePubidLiteral)rzparserCtxt.parsePubidLiteralcCr)zParse and return a string between quotes or doublequotes TODO: Deprecated, to be removed at next drop of binary compatibility )rBxmlParseQuotedStringr,rrrrparseQuotedString/rzparserCtxt.parseQuotedStringcCr)aLparse 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. [67] Reference ::= EntityRef | CharRef N)rBxmlParseReferencer,r"rrrparseReference6rzparserCtxt.parseReferencecCr)aparse 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. )rBxmlParseSDDeclr,rrrr parseSDDecl>s zparserCtxt.parseSDDeclcCr)aparse a start of tag either for rule element or EmptyElement. In both case we don't parse the tag closing chars. [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? '/>' )rBxmlParseStartTagr,rrrr parseStartTagRs zparserCtxt.parseStartTagcCr)zZparse an XML Literal [11] SystemLiteral ::= ('"' [^"]* '"') | ("'" [^']* "'") )rBxmlParseSystemLiteralr,rrrrparseSystemLiteral`rzparserCtxt.parseSystemLiteralcCr)z~parse an XML declaration header for external entities [77] TextDecl ::= '' N)rBxmlParseTextDeclr,r"rrr parseTextDeclfrzparserCtxt.parseTextDeclcCr)zparse the XML version. [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ") [25] Eq ::= S? '=' S? )rBxmlParseVersionInfor,rrrrparseVersionInfokrzparserCtxt.parseVersionInfocCr)zwparse the XML version value. [26] VersionNum ::= '1.' [0-9]+ In practice allow [0-9].[0-9]+ at that level )rBxmlParseVersionNumr,rrrrparseVersionNumqrzparserCtxt.parseVersionNumcCr)zoparse an XML declaration header [23] XMLDecl ::= '' N)rBxmlParseXMLDeclr,r"rrr parseXMLDeclwrzparserCtxt.parseXMLDeclcCr)aw[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)rBxmlParserHandlePEReferencer,r"rrrparserHandlePEReference|sz"parserCtxt.parserHandlePEReferencecCr)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)rBxmlParserHandleReferencer,r"rrrparserHandleReferences z parserCtxt.parserHandleReferencecCr)zqxmlPopInput: the current input pointed by ctxt->input came to an end pop it and return the next char. )rB xmlPopInputr,rrrrpopInputrzparserCtxt.popInputcCr)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)* )rB xmlScanNamer,rrrrscanNames zparserCtxt.scanNamecCr)zskip all blanks character found at that point in the input streams. It pops up finished entities in the process if allowable at that point. )rBxmlSkipBlankCharsr,rrrrskipBlankCharsrzparserCtxt.skipBlankCharscCrzTakes a entity string content and process to do the adequate substitutions. [67] Reference ::= EntityRef | CharRef [69] PEReference ::= '%' Name ';' )rBxmlStringDecodeEntitiesr,)rr>rr(rrr:rrrstringDecodeEntitiesszparserCtxt.stringDecodeEntitiesc Cst|j||||||}|Sr)rBxmlStringLenDecodeEntitiesr,)rr>r9rr(rrr:rrrstringLenDecodeEntitiessz"parserCtxt.stringLenDecodeEntitiesr)VrrrrrErrhrkrnrprrrtrvryr|rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r r rrrrrrrrrrrrP2s            rPc@feZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ dS)rNcCr)Nrz'xmlAttr got a wrong wrapper object typerr1r-rrrrrzxmlAttr.__init__cCr)Nzrr"rrrrrzxmlAttr.__repr__cCr)z*Dumps debug information for the attribute N)rBxmlDebugDumpAttrr,rrrr debugDumpAttrzxmlAttr.debugDumpAttrcCr)z/Dumps debug information for the attribute list N)rBxmlDebugDumpAttrListr,rrrrdebugDumpAttrListr zxmlAttr.debugDumpAttrListcCrrrrrb target__or: _xmlAttr__tmprrrrrzxmlAttr.copyPropcCrrrr#rrrrrzxmlAttr.copyPropListcCr)z1Free one attribute, all the content is freed too N)rB xmlFreePropr,r"rrrfreeProprzxmlAttr.freePropcCr)zQFree a property and all its siblings, all the children are freed too. N)rBxmlFreePropListr,r"rrr freePropListrzxmlAttr.freePropListcCr)zUnlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes )rB xmlRemovePropr,rrrr removeProprzxmlAttr.removePropcCrrrrrrrrrzxmlAttr.removeIDcCrrrrrrrr rzxmlAttr.removeRefr)rrrrrrr"rrr'r)r+rrrrrrrs    rc@eZdZdddZddZdS)rNcCr)Nrz,xmlAttribute got a wrong wrapper object typerr1r-rrrrrzxmlAttribute.__init__cCr)Nz"rr"rrrrrzxmlAttribute.__repr__rrrrrrrrrrr  rc@r)rNcCrrrr-rrrr zcatalog.__init__cCrr)r,rBxmlFreeCatalogr"rrrrE"rzcatalog.__del__cCr)zYAdd an entry in the catalog, it may overwrite existing but different entries. )rBxmlACatalogAddr,)rr rrr:rrradd+sz catalog.addcCr)zCheck is a catalog is empty )rBxmlCatalogIsEmptyr,rrrrcatalogIsEmpty1rzcatalog.catalogIsEmptycCrr)rBxmlConvertSGMLCatalogr,rrrrconvertSGMLCatalog6rzcatalog.convertSGMLCatalogcCr)z*Dump the given catalog to the given file. N)rBxmlACatalogDumpr,)rrrrrr;rz catalog.dumpcCr^r)rBxmlACatalogRemover,)rrr:rrrremove?rmzcatalog.removecCrer)rBxmlACatalogResolver,)rrrr:rrrresolveDrzcatalog.resolvecCr^)z_Try to lookup the catalog local reference associated to a public ID in that catalog )rBxmlACatalogResolvePublicr,)rrr:rrr resolvePublicIrPzcatalog.resolvePubliccCr^r)rBxmlACatalogResolveSystemr,)rrr:rrr resolveSystemOrmzcatalog.resolveSystemcCr^r)rBxmlACatalogResolveURIr,)rrFr:rrr resolveURITrmzcatalog.resolveURIr)rrrrrEr2r4r6rr9r;r=r?rArrrrrs   rc@VeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ ddZ dS)rNcCr)Nrz&xmlDtd got a wrong wrapper object typerr1r-rrrrZrzxmlDtd.__init__cCr)Nzrr"rrrr_rzxmlDtd.__repr__cCr)z$Dumps debug information for the DTD N)rBxmlDebugDumpDTDr,rrrr debugDumpDTDfrzxmlDtd.debugDumpDTDcCr)zDo a copy of the dtd. NzxmlCopyDtd() failedr)rB xmlCopyDtdr,rr)rr: _xmlDtd__tmprrrcopyDtdnr+zxmlDtd.copyDtdcCr)zFree a DTD structure. N)rB xmlFreeDtdr,r"rrrfreeDtdurzxmlDtd.freeDtdcCrE)zQSearch the DTD for the description of this attribute on this element. NzxmlGetDtdAttrDesc() failedr)rBxmlGetDtdAttrDescr,rr)rror_r:rFrrr dtdAttrDesc}rzxmlDtd.dtdAttrDesccCr)3Search the DTD for the description of this element NzxmlGetDtdElementDesc() failedr)rBxmlGetDtdElementDescr,rr)rr_r:rFrrrdtdElementDescrzxmlDtd.dtdElementDesccCr)z[Search the DTD for the description of this qualified attribute on this element. NzxmlGetDtdQAttrDesc() failedr)rBxmlGetDtdQAttrDescr,rr)rror_rr:rFrrr dtdQAttrDescrzxmlDtd.dtdQAttrDesccCrE)rLNzxmlGetDtdQElementDesc() failedr)rBxmlGetDtdQElementDescr,rr)rr_rr:rFrrrdtdQElementDescrVzxmlDtd.dtdQElementDescr) rrrrrrDrGrIrKrNrPrRrrrrrYs  rc@r,)rNcCr)Nrz*xmlElement got a wrong wrapper object typerr1r-rrrrrzxmlElement.__init__cCr)Nz rr"rrrrrzxmlElement.__repr__rr-rrrrrr.rc@&eZdZdddZddZddZdS) rNcCr)Nrz)xmlEntity got a wrong wrapper object typerr1r-rrrrrzxmlEntity.__init__cCr)Nzrr"rrrrrzxmlEntity.__repr__cCrrr)rrrrrrrrzxmlEntity.handleEntityr)rrrrrrrrrrrs  rc@rB)rNcCrrrr-rrrrr/zError.__init__cCr)z'The error code, e.g. an xmlParserError )rBxmlErrorGetCoder,rrrrrUrz Error.codecCr)z+What part of the library raised this error )rBxmlErrorGetDomainr,rrrrdomainrz Error.domaincCr)z the filename )rBxmlErrorGetFiler,rrrrrLrz Error.filecCr)zhow consequent is the error )rBxmlErrorGetLevelr,rrrrrrz Error.levelcCr)zthe line number if available )rBxmlErrorGetLiner,rrrrlinerz Error.linecCr)z)human-readable informative error message )rBxmlErrorGetMessager,rrrrmessagerz Error.messagecCr)z*Save the original error to the new place. N)r,rB xmlCopyError)rtoto__or:rrr copyErrorrzError.copyErrorcCr)zCleanup the error. N)rB xmlResetErrorr,r"rrr resetErrorrzError.resetErrorr) rrrrrUrVrLrrZr\r`rbrrrrrs  rc@seZdZd&ddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%ZdS)'rNcCr)Nrz%xmlNs got a wrong wrapper object typerr1r-rrrrrzxmlNs.__init__cCr)Nzrr"rrrrrzxmlNs.__repr__cCr)zDo a copy of the namespace. NzxmlCopyNamespace() failedr)rBxmlCopyNamespacer,rrrr: _xmlNs__tmprrr copyNamespacer+zxmlNs.copyNamespacecCr)z Do a copy of an namespace list. NzxmlCopyNamespaceList() failedr)rBxmlCopyNamespaceListr,rrrdrrrcopyNamespaceListr+zxmlNs.copyNamespaceListcCr)z1Free up the structures associated to a namespace N)rB xmlFreeNsr,r"rrrfreeNsrz xmlNs.freeNscCr)zLFree up all the structures associated to the chained namespaces. N)rB xmlFreeNsListr,r"rrr freeNsList rzxmlNs.freeNsListcCD|durd}n|j}t||j||}|durtdt|d}|Sr>r?rrr_re parent__or:rerrrrCrDzxmlNs.newChildcCrmrrrrr_rerr:rerrrr"rzxmlNs.newDocNodecCrmrrrprrrr0rzxmlNs.newDocNodeEatNamecCrmrrrprrrr>rNzxmlNs.newDocRawNodecCr)z8Creation of a new node element. @ns is optional (None). NzxmlNewNodeEatName() failedr)rBxmlNewNodeEatNamer,rr)rr_r:rerrrnewNodeEatNameHrzxmlNs.newNodeEatNamecCrmrHrJrrr_rrr:rerrrrMOrNzxmlNs.newNsPropcCrmrOrPrsrrrrRYrNzxmlNs.newNsPropEatNamecCrmrWrXrnrrrrZcr[zxmlNs.newTextChildcCrrrrrrrrrrvrz xmlNs.setNscCrmrrrsrrrr|rNzxmlNs.setNsPropcCr0rr)rrr_rr:rrrrrzxmlNs.unsetNsPropcCr)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)rBxmlXPathNodeSetFreeNsr,r"rrrxpathNodeSetFreeNsrzxmlNs.xpathNodeSetFreeNsr)rrrrrrfrhrjrlrCrrrrrrMrRrZrrrrvrrrrrs&     rc@r)rNcCrbr)r,rJrr-rrrrrczoutputBuffer.__init__cCs*|durd}n|j}t|j|||dSr5r6)rrcrrrrrrr7r:z+outputBuffer.htmlDocContentDumpFormatOutputcCs(|durd}n|j}t|j||dSr;r<)rrcrrrrrr=r>z%outputBuffer.htmlDocContentDumpOutputcCs@|durd}n|j}|durd}n|j}t|j||||dSrGrH)rrrcrrrrrrrrIrJz%outputBuffer.htmlNodeDumpFormatOutputcCs>|durd}n|j}|durd}n|j}t|j|||dSrKrL)rrrcrrrrrrrMrNzoutputBuffer.htmlNodeDumpOutputcCsB|durd}n|j}|durd}n|j}t|j|||||dSrr)rrrcrrrrrrrrrrzoutputBuffer.nodeDumpOutputcCrrr)rrcrrr:rrrrrzoutputBuffer.saveFileTocCr rr)rrcrrrr:rrrrrzoutputBuffer.saveFormatFileTocCr)zKGives a pointer to the data currently held in the output buffer )rBxmlOutputBufferGetContentr,rrrrrrzoutputBuffer.getContentcCre)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. )rBxmlOutputBufferWriter,rr9r8r:rrrr=rzoutputBuffer.writecCr^)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. )rBxmlOutputBufferWriteStringr,rr>r:rrr writeStringrzoutputBuffer.writeStringr)rrrrr7r=rIrMrrrrr=r|rrrrrs       rc@sFeZdZdddZddZddZdd Zd d Zd d ZddZ dS)rNcCrbr)r,r@rr-rrrrrczinputBuffer.__init__cCrr)r,rBrFr"rrrrErzinputBuffer.__del__cCr^)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 )rBxmlParserInputBufferGrowr,rr9r:rrrgrowrbzinputBuffer.growcCre)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. )rBxmlParserInputBufferPushr,ryrrrpushrzinputBuffer.pushcCr^)zRefresh the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8 )rBxmlParserInputBufferReadr,r~rrrr5r4zinputBuffer.readcCs,|durd}n|j}t||j|||}|Sz%Setup an XML reader with new options Nr,rBxmlTextReaderSetup)rrRrlrrmrSr:rrrSetup%zinputBuffer.SetupcCs2t|j|}|durtdt|d}||_|S)z2Create an xmlTextReader structure fed with @input NzxmlNewTextReader() failedr)rBxmlNewTextReaderr,rrr:)rrFr:_inputBuffer__tmprrr newTextReader,s  zinputBuffer.newTextReaderr) rrrrrErrr5rrrrrrrs    rc@r) r(NcCrrrr-rrrr5r/zxmlReg.__init__cCrr)r,rBxmlRegFreeRegexpr"rrrrE9rzxmlReg.__del__cCr^)z4Check if the regular expression generates the value )rB xmlRegexpExecr,)rrer:rrr regexpExecBrmzxmlReg.regexpExeccCr)z/Check if the regular expression is determinist )rBxmlRegexpIsDeterministr,rrrrregexpIsDeterministGrzxmlReg.regexpIsDeterministcCr)z5Print the content of the compiled regular expression N)rBxmlRegexpPrintr,rrrr regexpPrintLrzxmlReg.regexpPrintr)rrrrrErrrrrrrr(4s    r(c@r8) rNcCrrrr-rrrrQr/zrelaxNgParserCtxt.__init__cCrr)r,rBxmlRelaxNGFreeParserCtxtr"rrrrEUrzrelaxNgParserCtxt.__del__cCr)parse a schema definition resource and build an internal XML Schema structure which can be used to validate instances. NzxmlRelaxNGParse() failedr)rBxmlRelaxNGParser,r' relaxNgSchema)rr:_relaxNgParserCtxt__tmprrr relaxNGParse^  zrelaxNgParserCtxt.relaxNGParsecCr^)zSemi private function used to pass information to a parser context which are a combination of xmlRelaxNGParserFlag . )rBxmlRelaxParserSetFlagr,rrrrrelaxParserSetFlaggrPz$relaxNgParserCtxt.relaxParserSetFlagr)rrrrrErrrrrrrPs   rc@s>eZdZdddZddZddZdd Zd d Zd d ZdS)rNcCrrrr-rrrrnr/zrelaxNgSchema.__init__cCrr)r,rBxmlRelaxNGFreer"rrrrErrzrelaxNgSchema.__del__cCr)zDump a RelaxNG structure back N)rBxmlRelaxNGDumpr,rrrr relaxNGDump{rzrelaxNgSchema.relaxNGDumpcCr)z#Dump the transformed RelaxNG tree. N)rBxmlRelaxNGDumpTreer,rrrrrelaxNGDumpTreerzrelaxNgSchema.relaxNGDumpTreecC0t|j}|durtdt|d}||_|S)zOCreate an XML RelaxNGs validation context based on the given schema NzxmlRelaxNGNewValidCtxt() failedr)rBxmlRelaxNGNewValidCtxtr,rrelaxNgValidCtxtschema)rr:_relaxNgSchema__tmprrrrelaxNGNewValidCtxt  z!relaxNgSchema.relaxNGNewValidCtxtcCra6Use 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. Nr,rBxmlTextReaderRelaxNGSetSchemarQrrrRelaxNGSetSchemarzrelaxNgSchema.RelaxNGSetSchemar) rrrrrErrrrrrrrrms   rc@sNeZdZdddZddZddZdd Zd d Zd d ZddZ ddZ dS)rNcCd|_||_tj||ddSr)rr,r1rr-rrrrzrelaxNgValidCtxt.__init__cCrr)r,rBxmlRelaxNGFreeValidCtxtr"rrrrErzrelaxNgValidCtxt.__del__cCrr}r~rrrrrrz#relaxNgValidCtxt.relaxNGValidateDoccCrrrrrrorrr:rrrrrz+relaxNgValidCtxt.relaxNGValidateFullElementcCrrrrrrrrrz*relaxNgValidCtxt.relaxNGValidatePopElementcCrez;check the CData parsed for validation in the current stack )rBxmlRelaxNGValidatePushCDatar,rrZr9r:rrrrelaxNGValidatePushCDatarz)relaxNgValidCtxt.relaxNGValidatePushCDatacCrrrrrrrrrz+relaxNgValidCtxt.relaxNGValidatePushElementcCr0zUse 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. Nr,rB xmlTextReaderRelaxNGValidateCtxtrrRrmrSr:rrrRelaxNGValidateCtxtr7z$relaxNgValidCtxt.RelaxNGValidateCtxtr) rrrrrErrrrrrrrrrrs     rc@rS) r,NcCrrrr-rrrrr/zSchemaParserCtxt.__init__cCrr)r,rBxmlSchemaFreeParserCtxtr"rrrrErzSchemaParserCtxt.__del__cCr)rNzxmlSchemaParse() failedr)rBxmlSchemaParser,r'Schema)rr:_SchemaParserCtxt__tmprrr schemaParserzSchemaParserCtxt.schemaParser)rrrrrErrrrrr,s  r,c@r) rNcCrrrr-rrrrr/zSchema.__init__cCrr)r,rB xmlSchemaFreer"rrrrErzSchema.__del__cCra6Use 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. Nr,rBxmlTextReaderSetSchemarQrrr SetSchemarzSchema.SetSchemacCr)zDump a Schema structure. N)rB xmlSchemaDumpr,rrrr schemaDumprzSchema.schemaDumpcCr)zOCreate an XML Schemas validation context based on the given schema. NzxmlSchemaNewValidCtxt() failedr)rBxmlSchemaNewValidCtxtr,rSchemaValidCtxtr)rr: _Schema__tmprrrschemaNewValidCtxtrzSchema.schemaNewValidCtxtr)rrrrrErrrrrrrrs    rc@r)rNcCrr)rr,r/rr-rrrr#rzSchemaValidCtxt.__init__cCrr)r,rBxmlSchemaFreeValidCtxtr"rrrrE(rzSchemaValidCtxt.__del__cCr0zUse 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. Nr,rBxmlTextReaderSchemaValidateCtxtrrrrSchemaValidateCtxt1r7z"SchemaValidCtxt.SchemaValidateCtxtcCr)z3Check if any error was detected during validation. )rBxmlSchemaIsValidr,rrrr schemaIsValid?rzSchemaValidCtxt.schemaIsValidcCr^)z3Sets the options to be used during the validation. )rBxmlSchemaSetValidOptionsr,rrrrschemaSetValidOptionsDrmz%SchemaValidCtxt.schemaSetValidOptionscCr)z$Get the validation context options. )rBxmlSchemaValidCtxtGetOptionsr,rrrrschemaValidCtxtGetOptionsIrz)SchemaValidCtxt.schemaValidCtxtGetOptionscCr)zOallow access to the parser context of the schema validation context Nz(xmlSchemaValidCtxtGetParserCtxt() failedr)rBxmlSchemaValidCtxtGetParserCtxtr,r'rP)rr:_SchemaValidCtxt__tmprrrschemaValidCtxtGetParserCtxtNrz,SchemaValidCtxt.schemaValidCtxtGetParserCtxtcCrr}rYrrrrr[Vrz!SchemaValidCtxt.schemaValidateDoccCre)zpDo a schemas validation of the given resource, it will use the SAX streamable validation internally. )rBxmlSchemaValidateFiler,)rrfrmr:rrrschemaValidateFile]rz"SchemaValidCtxt.schemaValidateFilecCrrr)rrorr:rrrrcrz(SchemaValidCtxt.schemaValidateOneElementcCr)zlWorkaround to provide file error reporting information when this is not provided by current APIs N)rBxmlSchemaValidateSetFilenamer,)rrfrrrschemaValidateSetFilenamejrz)SchemaValidCtxt.schemaValidateSetFilenamer)rrrrrErrrrrr[rrrrrrrr"s   rc@rS) r3NcCrrrr-rrrrpr/zxmlTextReaderLocator.__init__cCr)z+Obtain the base URI for the given locator. )rBxmlTextReaderLocatorBaseURIr,rrrrBaseURIxrzxmlTextReaderLocator.BaseURIcCr)z.Obtain the line number for the given locator. )rBxmlTextReaderLocatorLineNumberr,rrrr LineNumber}rzxmlTextReaderLocator.LineNumberr)rrrrrrrrrrr3os  r3c@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~dZAddZBddZCdS)rNcCrr)r:r,r9rr-rrrrrzxmlTextReader.__init__cCrrr;r"rrrrErzxmlTextReader.__del__cCr)z6Provides the number of attributes of the current node )rBxmlTextReaderAttributeCountr,rrrrAttributeCountrzxmlTextReader.AttributeCountcCr)zThe base URI of the node. )rBxmlTextReaderConstBaseUrir,rrrrBaseUrirzxmlTextReader.BaseUricCr)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. )rBxmlTextReaderByteConsumedr,rrrr ByteConsumedrzxmlTextReader.ByteConsumedcCr)zThis method releases any resources allocated by the current instance changes the state to Closed and close any underlying input. )rBxmlTextReaderCloser,rrrrCloserzxmlTextReader.ClosecCr)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() failedr)rBxmlTextReaderCurrentDocr,rrrr:_xmlTextReader__tmprrr CurrentDocs  zxmlTextReader.CurrentDoccCr)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() failedr)rBxmlTextReaderCurrentNoder,rrrrrr CurrentNoder|zxmlTextReader.CurrentNodecCr)z#The depth of the node in the tree. )rBxmlTextReaderDepthr,rrrrDepthrzxmlTextReader.DepthcCr)z3Determine the encoding of the document being read. )rBxmlTextReaderConstEncodingr,rrrrEncodingrzxmlTextReader.EncodingcCr)zReads the contents of the current node and the full subtree. It then makes the subtree available until the next xmlTextReaderRead() call NzxmlTextReaderExpand() failedr)rBxmlTextReaderExpandr,rrrrrrExpandrzxmlTextReader.ExpandcCr^)zRProvides the value of the attribute with the specified qualified name. )rBxmlTextReaderGetAttributer,r`rrr GetAttributerPzxmlTextReader.GetAttributecCr^)zlProvides the value of the attribute with the specified index relative to the containing element. )rBxmlTextReaderGetAttributeNor,rnor:rrrGetAttributeNorPzxmlTextReader.GetAttributeNocCre)z.Provides the value of the specified attribute )rBxmlTextReaderGetAttributeNsr,r localName namespaceURIr:rrrGetAttributeNsrzxmlTextReader.GetAttributeNscCr)z8Provide the column number of the current parsing point. )rB"xmlTextReaderGetParserColumnNumberr,rrrrGetParserColumnNumberrz#xmlTextReader.GetParserColumnNumbercCr)z6Provide the line number of the current parsing point. )rB xmlTextReaderGetParserLineNumberr,rrrrGetParserLineNumberrz!xmlTextReader.GetParserLineNumbercCr^)z#Read the parser internal property. )rBxmlTextReaderGetParserPropr,)rrkr:rrr GetParserProprmzxmlTextReader.GetParserPropcCr)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() failedr)rBxmlTextReaderGetRemainderr,rrrrrr GetRemainders  zxmlTextReader.GetRemaindercCr)z!Whether the node has attributes. )rBxmlTextReaderHasAttributesr,rrrr HasAttributesrzxmlTextReader.HasAttributescCr)z(Whether the node can have a text value. )rBxmlTextReaderHasValuer,rrrrHasValuerzxmlTextReader.HasValuecCr)ziWhether an Attribute node was generated from the default value defined in the DTD or schema. )rBxmlTextReaderIsDefaultr,rrrr IsDefault rzxmlTextReader.IsDefaultcCr)z#Check if the current node is empty )rBxmlTextReaderIsEmptyElementr,rrrrIsEmptyElementrzxmlTextReader.IsEmptyElementcCr)zjDetermine whether the current node is a namespace declaration rather than a regular attribute. )rBxmlTextReaderIsNamespaceDeclr,rrrrIsNamespaceDeclrzxmlTextReader.IsNamespaceDeclcCr)z5Retrieve the validity status from the parser context )rBxmlTextReaderIsValidr,rrrrIsValidrzxmlTextReader.IsValidcCr)zThe local name of the node. )rBxmlTextReaderConstLocalNamer,rrrr LocalName!rzxmlTextReader.LocalNamecCr^)zLResolves a namespace prefix in the scope of the current element. )rBxmlTextReaderLookupNamespacer,rrr:rrrLookupNamespace&rPzxmlTextReader.LookupNamespacecCr^)zjMoves the position of the current instance to the attribute with the specified qualified name. )rBxmlTextReaderMoveToAttributer,r`rrrMoveToAttribute,rPzxmlTextReader.MoveToAttributecCr^)zMoves the position of the current instance to the attribute with the specified index relative to the containing element. )rBxmlTextReaderMoveToAttributeNor,rrrrMoveToAttributeNo2rPzxmlTextReader.MoveToAttributeNocCre)zxMoves the position of the current instance to the attribute with the specified local name and namespace URI. )rBxmlTextReaderMoveToAttributeNsr,rrrrMoveToAttributeNs8rzxmlTextReader.MoveToAttributeNscCr)zmMoves the position of the current instance to the node that contains the current Attribute node. )rBxmlTextReaderMoveToElementr,rrrr MoveToElement>rzxmlTextReader.MoveToElementcCr)zoMoves the position of the current instance to the first attribute associated with the current node. )rB!xmlTextReaderMoveToFirstAttributer,rrrrMoveToFirstAttributeDrz"xmlTextReader.MoveToFirstAttributecCr)znMoves the position of the current instance to the next attribute associated with the current node. )rB xmlTextReaderMoveToNextAttributer,rrrrMoveToNextAttributeJrz!xmlTextReader.MoveToNextAttributecCr)z r@ rC rE rG rI rrN rrR rrT rrrW rY r[ r] r_ rrrrrs               rc@eZdZd4ddZddZddZdd 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)5rFNcCrrrr-rrrr;r/z URI.__init__cCrr)r,rB xmlFreeURIr"rrrrE?rz URI.__del__cCr)z#Get the authority part from an URI )rBxmlURIGetAuthorityr,rrrr authorityErz URI.authoritycCr)z"Get the fragment part from an URI )rBxmlURIGetFragmentr,rrrrfragmentJrz URI.fragmentcCr)z Get the opaque part from an URI )rBxmlURIGetOpaquer,rrrropaqueOrz URI.opaquecCr)zGet the path part from an URI )rB xmlURIGetPathr,rrrrrTrzURI.pathcCr)zGet the port part from an URI )rB xmlURIGetPortr,rrrrr/YrzURI.portcCr)zGet the query part from an URI )rBxmlURIGetQueryr,rrrrquery^rz URI.querycCr)zIGet the raw query part from an URI (i.e. the unescaped form). )rBxmlURIGetQueryRawr,rrrrqueryRawcrz URI.queryRawcCr)z Get the scheme part from an URI )rBxmlURIGetSchemer,rrrrschemeirz URI.schemecCr)z Get the server part from an URI )rBxmlURIGetServerr,rrrrservernrz URI.servercCr)z"Set the authority part of an URI. N)rBxmlURISetAuthorityr,)rrc rrr setAuthoritysrzURI.setAuthoritycCr)z!Set the fragment part of an URI. N)rBxmlURISetFragmentr,)rre rrr setFragmentwrzURI.setFragmentcCr)zSet the opaque part of an URI. N)rBxmlURISetOpaquer,)rrg rrr setOpaque{rz URI.setOpaquecCr)zSet the path part of an URI. N)rB xmlURISetPathr,)rrrrrsetPathrz URI.setPathcCr)zSet the port part of an URI. N)rB xmlURISetPortr,)rr/rrrsetPortrz URI.setPortcCr)zSet the query part of an URI. N)rBxmlURISetQueryr,)rrk rrrsetQueryrz URI.setQuerycCr)z|durd}n|j}|durd}n|j}t|j|||}|Sr:r;rrror>rrr:rrrr?Br@zValidCtxt.validatePopElementcCrer)rBxmlValidatePushCDatar,rrrrvalidatePushCDataKrzValidCtxt.validatePushCDatacCr rArBr rrrrDPr@zValidCtxt.validatePushElementcCrrErFrrrrrHYrzValidCtxt.validateRootr)rrrrrEr rrrr r%r)r-r2r7r?r rDrHrrrrrs"         rc@r` )5r NcCrrrr-rrrrdr/zxpathContext.__init__cCr)z!Get the doc from an xpathContext NzxmlXPathGetContextDoc() failedr)rBxmlXPathGetContextDocr,r)rrr:_xpathContext__tmprrr contextDocir+zxpathContext.contextDoccCr)*Get the current node from an xpathContext NzxmlXPathGetContextNode() failedr)rBxmlXPathGetContextNoder,r)rr rrr contextNodepr+zxpathContext.contextNodecCrr )rBxmlXPathGetContextPositionr,rrrrcontextPositionwrzxpathContext.contextPositioncCrr )rBxmlXPathGetContextSizer,rrrr contextSize|rzxpathContext.contextSizecCr)z+Get the current function name xpathContext )rBxmlXPathGetFunctionr,rrrrfunctionrzxpathContext.functioncCr)z/Get the current function name URI xpathContext )rBxmlXPathGetFunctionURIr,rrrr functionURIrzxpathContext.functionURIcCr)zSet the doc of an xpathContext N)r,rBxmlXPathSetContextDocrrrr setContextDocrzxpathContext.setContextDoccCr)z(Set the current node of an xpathContext N)r,rBxmlXPathSetContextNodertrrrrrzxpathContext.setContextNodecCr)zr:r rrrxpathNewParserContextrz"xpathContext.xpathNewParserContextcCr^)zSearch in the namespace declaration array of the context for the given namespace name associated to the given prefix )rBxmlXPathNsLookupr,r rrr xpathNsLookuprPzxpathContext.xpathNsLookupcCr)z6Registers all default XPath functions in this context N)rBxmlXPathRegisterAllFunctionsr,r"rrrxpathRegisterAllFunctionsrz&xpathContext.xpathRegisterAllFunctionscCre)zURegister a new namespace. If @ns_uri is None it unregisters the namespace )rBxmlXPathRegisterNsr,)rrrr:rrrxpathRegisterNsrzxpathContext.xpathRegisterNscCr)zMCleanup the XPath context data associated to registered functions N)rBxmlXPathRegisteredFuncsCleanupr,r"rrrxpathRegisteredFuncsCleanuprz(xpathContext.xpathRegisteredFuncsCleanupcCrzMCleanup the XPath context data associated to registered variables N)rBxmlXPathRegisteredNsCleanupr,r"rrrxpathRegisteredNsCleanuprz%xpathContext.xpathRegisteredNsCleanupcCrr )rB"xmlXPathRegisteredVariablesCleanupr,r"rrrxpathRegisteredVariablesCleanuprz,xpathContext.xpathRegisteredVariablesCleanupcCs&t|j|}|durtdt|S)USearch in the Variable array of the context for the given variable value. NzxmlXPathVariableLookup() failed)rBxmlXPathVariableLookupr,r)rr`rrrxpathVariableLookupsz xpathContext.xpathVariableLookupcCs(t|j||}|durtdt|S)r Nz!xmlXPathVariableLookupNS() failed)rBxmlXPathVariableLookupNSr,r)r)rr_rr:rrrxpathVariableLookupNSsz"xpathContext.xpathVariableLookupNScCr )r NzxmlXPtrEval() failed)rB xmlXPtrEvalr,rrr{rrr xpointerEvalr zxpathContext.xpointerEvalr)rrrrr r r r r r r rrr r rr rr r r r r r r r r r rrrrr cs4     r c@seZdZd~ddZddZddZdd 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@dS)r NcCrrrr-rrrrr/zxpathParserContext.__init__cCr)z0Get the xpathContext from an xpathParserContext Nz!xmlXPathParserGetContext() failedr)rBxmlXPathParserGetContextr,r)r )rr:_xpathParserContext__tmprrrcontext r+zxpathParserContext.contextcCr)zImplement the add operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function. N)rBxmlXPathAddValuesr,r"rrrxpathAddValuesrz!xpathParserContext.xpathAddValuescCr)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)rBxmlXPathBooleanFunctionr,rnargsrrrxpathBooleanFunctionz'xpathParserContext.xpathBooleanFunctioncCr)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)rBxmlXPathCeilingFunctionr,r rrrxpathCeilingFunction'rz'xpathParserContext.xpathCeilingFunctioncCre)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. )rBxmlXPathCompareValuesr,)rinfstrictr:rrrxpathCompareValues.sz%xpathParserContext.xpathCompareValuescCr)zImplement the concat() XPath function string concat(string, string, string*) The concat function returns the concatenation of its arguments. N)rBxmlXPathConcatFunctionr,r rrrxpathConcatFunction@z&xpathParserContext.xpathConcatFunctioncCr)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)rBxmlXPathContainsFunctionr,r rrrxpathContainsFunctionFrz(xpathParserContext.xpathContainsFunctioncCr)z?ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoiiiiiiiiiiiiiiiiiiiiii i i i i iiiiiiiiiiiiiiiii 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%iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiipiqirisitiXiii ii ii@iiiiii@(rBtypesrr6rrrrr'r(r)r*r@rJrOrrrrrrPARSER_LOADDTDPARSER_DEFAULTATTRSPARSER_VALIDATEPARSER_SUBST_ENTITIES PARSER_SEVERITY_VALIDITY_WARNINGPARSER_SEVERITY_VALIDITY_ERRORPARSER_SEVERITY_WARNINGPARSER_SEVERITY_ERRORr rr"r/r1r7r9rCrErKrMrOrVrZr_rbrdrjroruryr|r}rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r r rrrrrrrr r"r$r&r(r*r,r2r5r7r9r;r>r@rBrDrGrJrLrNrQrSrUrWrYr[r]r_rarcrerirlrorsrvrxrzr{r|rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r rrrrrrrr r"r$r&r*r-r/r1r3r5r7r;r?rArDrGrJrLrOrRrVrXrZr\r^r`rbrdrfrirkrmrorqrsrurwryr{r}rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r rrrrrrrrrr r"r$r&r(r*r,r.r0r2r4r6r8r:r<r>r@rBrDrFrHrJrLrNrPrRrTrVrXrZr\r^r`rbrdrfrhrjrlrnrprrrtrvrxrzr|r~rrrrrrrrrrrrrrrrrrrrrrrPrrrrrrrrrrr(rrrr,rrr3rrFrr r XLINK_SHOW_NONEXLINK_SHOW_NEWXLINK_SHOW_EMBEDXLINK_SHOW_REPLACEXML_RELAXNGP_NONEXML_RELAXNGP_FREE_DOCXML_RELAXNGP_CRNGXML_BUFFER_ALLOC_DOUBLEITXML_BUFFER_ALLOC_EXACTXML_BUFFER_ALLOC_IMMUTABLEXML_BUFFER_ALLOC_IOXML_BUFFER_ALLOC_HYBRIDXML_BUFFER_ALLOC_BOUNDED$XML_PARSER_SEVERITY_VALIDITY_WARNING"XML_PARSER_SEVERITY_VALIDITY_ERRORXML_PARSER_SEVERITY_WARNINGXML_PARSER_SEVERITY_ERRORXML_ATTRIBUTE_NONEXML_ATTRIBUTE_REQUIREDXML_ATTRIBUTE_IMPLIEDXML_ATTRIBUTE_FIXEDXML_SCHEMAS_UNKNOWNXML_SCHEMAS_STRINGXML_SCHEMAS_NORMSTRINGXML_SCHEMAS_DECIMALXML_SCHEMAS_TIMEXML_SCHEMAS_GDAYXML_SCHEMAS_GMONTHXML_SCHEMAS_GMONTHDAYXML_SCHEMAS_GYEARXML_SCHEMAS_GYEARMONTHXML_SCHEMAS_DATEXML_SCHEMAS_DATETIMEXML_SCHEMAS_DURATIONXML_SCHEMAS_FLOATXML_SCHEMAS_DOUBLEXML_SCHEMAS_BOOLEANXML_SCHEMAS_TOKENXML_SCHEMAS_LANGUAGEXML_SCHEMAS_NMTOKENXML_SCHEMAS_NMTOKENSXML_SCHEMAS_NAMEXML_SCHEMAS_QNAMEXML_SCHEMAS_NCNAMEXML_SCHEMAS_IDXML_SCHEMAS_IDREFXML_SCHEMAS_IDREFSXML_SCHEMAS_ENTITYXML_SCHEMAS_ENTITIESXML_SCHEMAS_NOTATIONXML_SCHEMAS_ANYURIXML_SCHEMAS_INTEGERXML_SCHEMAS_NPINTEGERXML_SCHEMAS_NINTEGERXML_SCHEMAS_NNINTEGERXML_SCHEMAS_PINTEGERXML_SCHEMAS_INTXML_SCHEMAS_UINTXML_SCHEMAS_LONGXML_SCHEMAS_ULONGXML_SCHEMAS_SHORTXML_SCHEMAS_USHORTXML_SCHEMAS_BYTEXML_SCHEMAS_UBYTEXML_SCHEMAS_HEXBINARYXML_SCHEMAS_BASE64BINARYXML_SCHEMAS_ANYTYPEXML_SCHEMAS_ANYSIMPLETYPEXML_PARSER_EOFXML_PARSER_STARTXML_PARSER_MISC XML_PARSER_PIXML_PARSER_DTDXML_PARSER_PROLOGXML_PARSER_COMMENTXML_PARSER_START_TAGXML_PARSER_CONTENTXML_PARSER_CDATA_SECTIONXML_PARSER_END_TAGXML_PARSER_ENTITY_DECLXML_PARSER_ENTITY_VALUEXML_PARSER_ATTRIBUTE_VALUEXML_PARSER_SYSTEM_LITERALXML_PARSER_EPILOGXML_PARSER_IGNOREXML_PARSER_PUBLIC_LITERALXML_INTERNAL_GENERAL_ENTITY"XML_EXTERNAL_GENERAL_PARSED_ENTITY$XML_EXTERNAL_GENERAL_UNPARSED_ENTITYXML_INTERNAL_PARAMETER_ENTITYXML_EXTERNAL_PARAMETER_ENTITYXML_INTERNAL_PREDEFINED_ENTITYXML_SAVE_FORMATXML_SAVE_NO_DECLXML_SAVE_NO_EMPTYXML_SAVE_NO_XHTMLXML_SAVE_XHTMLXML_SAVE_AS_XMLXML_SAVE_AS_HTMLXML_SAVE_WSNONSIGXML_PATTERN_DEFAULTXML_PATTERN_XPATHXML_PATTERN_XSSELXML_PATTERN_XSFIELD XML_ERR_OKXML_ERR_INTERNAL_ERRORXML_ERR_NO_MEMORYXML_ERR_DOCUMENT_STARTXML_ERR_DOCUMENT_EMPTYXML_ERR_DOCUMENT_ENDXML_ERR_INVALID_HEX_CHARREFXML_ERR_INVALID_DEC_CHARREFXML_ERR_INVALID_CHARREFXML_ERR_INVALID_CHARXML_ERR_CHARREF_AT_EOFXML_ERR_CHARREF_IN_PROLOGXML_ERR_CHARREF_IN_EPILOGXML_ERR_CHARREF_IN_DTDXML_ERR_ENTITYREF_AT_EOFXML_ERR_ENTITYREF_IN_PROLOGXML_ERR_ENTITYREF_IN_EPILOGXML_ERR_ENTITYREF_IN_DTDXML_ERR_PEREF_AT_EOFXML_ERR_PEREF_IN_PROLOGXML_ERR_PEREF_IN_EPILOGXML_ERR_PEREF_IN_INT_SUBSETXML_ERR_ENTITYREF_NO_NAME!XML_ERR_ENTITYREF_SEMICOL_MISSINGXML_ERR_PEREF_NO_NAMEXML_ERR_PEREF_SEMICOL_MISSINGXML_ERR_UNDECLARED_ENTITYXML_WAR_UNDECLARED_ENTITYXML_ERR_UNPARSED_ENTITYXML_ERR_ENTITY_IS_EXTERNALXML_ERR_ENTITY_IS_PARAMETERXML_ERR_UNKNOWN_ENCODINGXML_ERR_UNSUPPORTED_ENCODINGXML_ERR_STRING_NOT_STARTEDXML_ERR_STRING_NOT_CLOSEDXML_ERR_NS_DECL_ERRORXML_ERR_ENTITY_NOT_STARTEDXML_ERR_ENTITY_NOT_FINISHEDXML_ERR_LT_IN_ATTRIBUTEXML_ERR_ATTRIBUTE_NOT_STARTEDXML_ERR_ATTRIBUTE_NOT_FINISHEDXML_ERR_ATTRIBUTE_WITHOUT_VALUEXML_ERR_ATTRIBUTE_REDEFINEDXML_ERR_LITERAL_NOT_STARTEDXML_ERR_LITERAL_NOT_FINISHEDXML_ERR_COMMENT_NOT_FINISHEDXML_ERR_PI_NOT_STARTEDXML_ERR_PI_NOT_FINISHEDXML_ERR_NOTATION_NOT_STARTEDXML_ERR_NOTATION_NOT_FINISHEDXML_ERR_ATTLIST_NOT_STARTEDXML_ERR_ATTLIST_NOT_FINISHEDXML_ERR_MIXED_NOT_STARTEDXML_ERR_MIXED_NOT_FINISHEDXML_ERR_ELEMCONTENT_NOT_STARTED XML_ERR_ELEMCONTENT_NOT_FINISHEDXML_ERR_XMLDECL_NOT_STARTEDXML_ERR_XMLDECL_NOT_FINISHEDXML_ERR_CONDSEC_NOT_STARTEDXML_ERR_CONDSEC_NOT_FINISHEDXML_ERR_EXT_SUBSET_NOT_FINISHEDXML_ERR_DOCTYPE_NOT_FINISHEDXML_ERR_MISPLACED_CDATA_ENDXML_ERR_CDATA_NOT_FINISHEDXML_ERR_RESERVED_XML_NAMEXML_ERR_SPACE_REQUIREDXML_ERR_SEPARATOR_REQUIREDXML_ERR_NMTOKEN_REQUIREDXML_ERR_NAME_REQUIREDXML_ERR_PCDATA_REQUIREDXML_ERR_URI_REQUIREDXML_ERR_PUBID_REQUIREDXML_ERR_LT_REQUIREDXML_ERR_GT_REQUIREDXML_ERR_LTSLASH_REQUIREDXML_ERR_EQUAL_REQUIREDXML_ERR_TAG_NAME_MISMATCHXML_ERR_TAG_NOT_FINISHEDXML_ERR_STANDALONE_VALUEXML_ERR_ENCODING_NAMEXML_ERR_HYPHEN_IN_COMMENTXML_ERR_INVALID_ENCODINGXML_ERR_EXT_ENTITY_STANDALONEXML_ERR_CONDSEC_INVALIDXML_ERR_VALUE_REQUIREDXML_ERR_NOT_WELL_BALANCEDXML_ERR_EXTRA_CONTENTXML_ERR_ENTITY_CHAR_ERRORXML_ERR_ENTITY_PE_INTERNALXML_ERR_ENTITY_LOOPXML_ERR_ENTITY_BOUNDARYXML_ERR_INVALID_URIXML_ERR_URI_FRAGMENTXML_WAR_CATALOG_PIXML_ERR_NO_DTDXML_ERR_CONDSEC_INVALID_KEYWORDXML_ERR_VERSION_MISSINGXML_WAR_UNKNOWN_VERSIONXML_WAR_LANG_VALUEXML_WAR_NS_URIXML_WAR_NS_URI_RELATIVEXML_ERR_MISSING_ENCODINGXML_WAR_SPACE_VALUEXML_ERR_NOT_STANDALONEXML_ERR_ENTITY_PROCESSINGXML_ERR_NOTATION_PROCESSINGXML_WAR_NS_COLUMNXML_WAR_ENTITY_REDEFINEDXML_ERR_UNKNOWN_VERSIONXML_ERR_VERSION_MISMATCHXML_ERR_NAME_TOO_LONGXML_ERR_USER_STOPXML_NS_ERR_XML_NAMESPACEXML_NS_ERR_UNDEFINED_NAMESPACEXML_NS_ERR_QNAMEXML_NS_ERR_ATTRIBUTE_REDEFINEDXML_NS_ERR_EMPTYXML_NS_ERR_COLONXML_DTD_ATTRIBUTE_DEFAULTXML_DTD_ATTRIBUTE_REDEFINEDXML_DTD_ATTRIBUTE_VALUEXML_DTD_CONTENT_ERRORXML_DTD_CONTENT_MODELXML_DTD_CONTENT_NOT_DETERMINISTXML_DTD_DIFFERENT_PREFIXXML_DTD_ELEM_DEFAULT_NAMESPACEXML_DTD_ELEM_NAMESPACEXML_DTD_ELEM_REDEFINEDXML_DTD_EMPTY_NOTATIONXML_DTD_ENTITY_TYPEXML_DTD_ID_FIXEDXML_DTD_ID_REDEFINEDXML_DTD_ID_SUBSETXML_DTD_INVALID_CHILDXML_DTD_INVALID_DEFAULTXML_DTD_LOAD_ERRORXML_DTD_MISSING_ATTRIBUTEXML_DTD_MIXED_CORRUPTXML_DTD_MULTIPLE_IDXML_DTD_NO_DOCXML_DTD_NO_DTDXML_DTD_NO_ELEM_NAMEXML_DTD_NO_PREFIXXML_DTD_NO_ROOTXML_DTD_NOTATION_REDEFINEDXML_DTD_NOTATION_VALUEXML_DTD_NOT_EMPTYXML_DTD_NOT_PCDATAXML_DTD_NOT_STANDALONEXML_DTD_ROOT_NAMEXML_DTD_STANDALONE_WHITE_SPACEXML_DTD_UNKNOWN_ATTRIBUTEXML_DTD_UNKNOWN_ELEMXML_DTD_UNKNOWN_ENTITYXML_DTD_UNKNOWN_IDXML_DTD_UNKNOWN_NOTATIONXML_DTD_STANDALONE_DEFAULTEDXML_DTD_XMLID_VALUEXML_DTD_XMLID_TYPEXML_DTD_DUP_TOKENXML_HTML_STRUCURE_ERRORXML_HTML_UNKNOWN_TAGXML_RNGP_ANYNAME_ATTR_ANCESTORXML_RNGP_ATTR_CONFLICTXML_RNGP_ATTRIBUTE_CHILDRENXML_RNGP_ATTRIBUTE_CONTENTXML_RNGP_ATTRIBUTE_EMPTYXML_RNGP_ATTRIBUTE_NOOPXML_RNGP_CHOICE_CONTENTXML_RNGP_CHOICE_EMPTYXML_RNGP_CREATE_FAILUREXML_RNGP_DATA_CONTENT"XML_RNGP_DEF_CHOICE_AND_INTERLEAVEXML_RNGP_DEFINE_CREATE_FAILEDXML_RNGP_DEFINE_EMPTYXML_RNGP_DEFINE_MISSINGXML_RNGP_DEFINE_NAME_MISSINGXML_RNGP_ELEM_CONTENT_EMPTYXML_RNGP_ELEM_CONTENT_ERRORXML_RNGP_ELEMENT_EMPTYXML_RNGP_ELEMENT_CONTENTXML_RNGP_ELEMENT_NAMEXML_RNGP_ELEMENT_NO_CONTENTXML_RNGP_ELEM_TEXT_CONFLICTXML_RNGP_EMPTYXML_RNGP_EMPTY_CONSTRUCTXML_RNGP_EMPTY_CONTENTXML_RNGP_EMPTY_NOT_EMPTYXML_RNGP_ERROR_TYPE_LIBXML_RNGP_EXCEPT_EMPTYXML_RNGP_EXCEPT_MISSINGXML_RNGP_EXCEPT_MULTIPLEXML_RNGP_EXCEPT_NO_CONTENTXML_RNGP_EXTERNALREF_EMTPYXML_RNGP_EXTERNAL_REF_FAILUREXML_RNGP_EXTERNALREF_RECURSEXML_RNGP_FORBIDDEN_ATTRIBUTEXML_RNGP_FOREIGN_ELEMENTXML_RNGP_GRAMMAR_CONTENTXML_RNGP_GRAMMAR_EMPTYXML_RNGP_GRAMMAR_MISSINGXML_RNGP_GRAMMAR_NO_STARTXML_RNGP_GROUP_ATTR_CONFLICTXML_RNGP_HREF_ERRORXML_RNGP_INCLUDE_EMPTYXML_RNGP_INCLUDE_FAILUREXML_RNGP_INCLUDE_RECURSEXML_RNGP_INTERLEAVE_ADD!XML_RNGP_INTERLEAVE_CREATE_FAILEDXML_RNGP_INTERLEAVE_EMPTYXML_RNGP_INTERLEAVE_NO_CONTENTXML_RNGP_INVALID_DEFINE_NAMEXML_RNGP_INVALID_URIXML_RNGP_INVALID_VALUEXML_RNGP_MISSING_HREFXML_RNGP_NAME_MISSINGXML_RNGP_NEED_COMBINEXML_RNGP_NOTALLOWED_NOT_EMPTYXML_RNGP_NSNAME_ATTR_ANCESTORXML_RNGP_NSNAME_NO_NSXML_RNGP_PARAM_FORBIDDENXML_RNGP_PARAM_NAME_MISSING XML_RNGP_PARENTREF_CREATE_FAILEDXML_RNGP_PARENTREF_NAME_INVALIDXML_RNGP_PARENTREF_NO_NAMEXML_RNGP_PARENTREF_NO_PARENTXML_RNGP_PARENTREF_NOT_EMPTYXML_RNGP_PARSE_ERROR#XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAMEXML_RNGP_PAT_ATTR_ATTRXML_RNGP_PAT_ATTR_ELEMXML_RNGP_PAT_DATA_EXCEPT_ATTRXML_RNGP_PAT_DATA_EXCEPT_ELEMXML_RNGP_PAT_DATA_EXCEPT_EMPTYXML_RNGP_PAT_DATA_EXCEPT_GROUP#XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVEXML_RNGP_PAT_DATA_EXCEPT_LIST XML_RNGP_PAT_DATA_EXCEPT_ONEMOREXML_RNGP_PAT_DATA_EXCEPT_REFXML_RNGP_PAT_DATA_EXCEPT_TEXTXML_RNGP_PAT_LIST_ATTRXML_RNGP_PAT_LIST_ELEMXML_RNGP_PAT_LIST_INTERLEAVEXML_RNGP_PAT_LIST_LISTXML_RNGP_PAT_LIST_REFXML_RNGP_PAT_LIST_TEXT"XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME!XML_RNGP_PAT_NSNAME_EXCEPT_NSNAMEXML_RNGP_PAT_ONEMORE_GROUP_ATTR$XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTRXML_RNGP_PAT_START_ATTRXML_RNGP_PAT_START_DATAXML_RNGP_PAT_START_EMPTYXML_RNGP_PAT_START_GROUPXML_RNGP_PAT_START_INTERLEAVEXML_RNGP_PAT_START_LISTXML_RNGP_PAT_START_ONEMOREXML_RNGP_PAT_START_TEXTXML_RNGP_PAT_START_VALUEXML_RNGP_PREFIX_UNDEFINEDXML_RNGP_REF_CREATE_FAILEDXML_RNGP_REF_CYCLEXML_RNGP_REF_NAME_INVALIDXML_RNGP_REF_NO_DEFXML_RNGP_REF_NO_NAMEXML_RNGP_REF_NOT_EMPTY$XML_RNGP_START_CHOICE_AND_INTERLEAVEXML_RNGP_START_CONTENTXML_RNGP_START_EMPTYXML_RNGP_START_MISSINGXML_RNGP_TEXT_EXPECTEDXML_RNGP_TEXT_HAS_CHILDXML_RNGP_TYPE_MISSINGXML_RNGP_TYPE_NOT_FOUNDXML_RNGP_TYPE_VALUEXML_RNGP_UNKNOWN_ATTRIBUTEXML_RNGP_UNKNOWN_COMBINEXML_RNGP_UNKNOWN_CONSTRUCTXML_RNGP_UNKNOWN_TYPE_LIBXML_RNGP_URI_FRAGMENTXML_RNGP_URI_NOT_ABSOLUTEXML_RNGP_VALUE_EMPTYXML_RNGP_VALUE_NO_CONTENTXML_RNGP_XMLNS_NAMEXML_RNGP_XML_NSXML_XPATH_EXPRESSION_OKXML_XPATH_NUMBER_ERROR"XML_XPATH_UNFINISHED_LITERAL_ERRORXML_XPATH_START_LITERAL_ERRORXML_XPATH_VARIABLE_REF_ERRORXML_XPATH_UNDEF_VARIABLE_ERROR!XML_XPATH_INVALID_PREDICATE_ERRORXML_XPATH_EXPR_ERRORXML_XPATH_UNCLOSED_ERRORXML_XPATH_UNKNOWN_FUNC_ERRORXML_XPATH_INVALID_OPERANDXML_XPATH_INVALID_TYPEXML_XPATH_INVALID_ARITYXML_XPATH_INVALID_CTXT_SIZEXML_XPATH_INVALID_CTXT_POSITIONXML_XPATH_MEMORY_ERRORXML_XPTR_SYNTAX_ERRORXML_XPTR_RESOURCE_ERRORXML_XPTR_SUB_RESOURCE_ERRORXML_XPATH_UNDEF_PREFIX_ERRORXML_XPATH_ENCODING_ERRORXML_XPATH_INVALID_CHAR_ERRORXML_TREE_INVALID_HEXXML_TREE_INVALID_DECXML_TREE_UNTERMINATED_ENTITYXML_TREE_NOT_UTF8XML_SAVE_NOT_UTF8XML_SAVE_CHAR_INVALIDXML_SAVE_NO_DOCTYPEXML_SAVE_UNKNOWN_ENCODINGXML_REGEXP_COMPILE_ERRORXML_IO_UNKNOWN XML_IO_EACCES XML_IO_EAGAIN XML_IO_EBADFXML_IO_EBADMSG XML_IO_EBUSYXML_IO_ECANCELED XML_IO_ECHILDXML_IO_EDEADLK XML_IO_EDOM XML_IO_EEXIST XML_IO_EFAULT XML_IO_EFBIGXML_IO_EINPROGRESS XML_IO_EINTR XML_IO_EINVAL XML_IO_EIO XML_IO_EISDIR XML_IO_EMFILE XML_IO_EMLINKXML_IO_EMSGSIZEXML_IO_ENAMETOOLONG XML_IO_ENFILE XML_IO_ENODEV XML_IO_ENOENTXML_IO_ENOEXEC XML_IO_ENOLCK XML_IO_ENOMEM XML_IO_ENOSPC XML_IO_ENOSYSXML_IO_ENOTDIRXML_IO_ENOTEMPTYXML_IO_ENOTSUP XML_IO_ENOTTY XML_IO_ENXIO XML_IO_EPERM XML_IO_EPIPE XML_IO_ERANGE XML_IO_EROFS XML_IO_ESPIPE XML_IO_ESRCHXML_IO_ETIMEDOUT XML_IO_EXDEVXML_IO_NETWORK_ATTEMPTXML_IO_ENCODER XML_IO_FLUSH XML_IO_WRITEXML_IO_NO_INPUTXML_IO_BUFFER_FULLXML_IO_LOAD_ERRORXML_IO_ENOTSOCKXML_IO_EISCONNXML_IO_ECONNREFUSEDXML_IO_ENETUNREACHXML_IO_EADDRINUSEXML_IO_EALREADYXML_IO_EAFNOSUPPORTXML_XINCLUDE_RECURSIONXML_XINCLUDE_PARSE_VALUE XML_XINCLUDE_ENTITY_DEF_MISMATCHXML_XINCLUDE_NO_HREFXML_XINCLUDE_NO_FALLBACKXML_XINCLUDE_HREF_URIXML_XINCLUDE_TEXT_FRAGMENTXML_XINCLUDE_TEXT_DOCUMENTXML_XINCLUDE_INVALID_CHARXML_XINCLUDE_BUILD_FAILEDXML_XINCLUDE_UNKNOWN_ENCODINGXML_XINCLUDE_MULTIPLE_ROOTXML_XINCLUDE_XPTR_FAILEDXML_XINCLUDE_XPTR_RESULTXML_XINCLUDE_INCLUDE_IN_INCLUDE!XML_XINCLUDE_FALLBACKS_IN_INCLUDE$XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDEXML_XINCLUDE_DEPRECATED_NSXML_XINCLUDE_FRAGMENT_IDXML_CATALOG_MISSING_ATTRXML_CATALOG_ENTRY_BROKENXML_CATALOG_PREFER_VALUEXML_CATALOG_NOT_CATALOGXML_CATALOG_RECURSIONXML_SCHEMAP_PREFIX_UNDEFINED!XML_SCHEMAP_ATTRFORMDEFAULT_VALUE XML_SCHEMAP_ATTRGRP_NONAME_NOREFXML_SCHEMAP_ATTR_NONAME_NOREF$XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF!XML_SCHEMAP_ELEMFORMDEFAULT_VALUEXML_SCHEMAP_ELEM_NONAME_NOREFXML_SCHEMAP_EXTENSION_NO_BASEXML_SCHEMAP_FACET_NO_VALUEXML_SCHEMAP_FAILED_BUILD_IMPORTXML_SCHEMAP_GROUP_NONAME_NOREF$XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI"XML_SCHEMAP_IMPORT_REDEFINE_NSNAME!XML_SCHEMAP_IMPORT_SCHEMA_NOT_URIXML_SCHEMAP_INVALID_BOOLEANXML_SCHEMAP_INVALID_ENUMXML_SCHEMAP_INVALID_FACETXML_SCHEMAP_INVALID_FACET_VALUEXML_SCHEMAP_INVALID_MAXOCCURSXML_SCHEMAP_INVALID_MINOCCURS#XML_SCHEMAP_INVALID_REF_AND_SUBTYPEXML_SCHEMAP_INVALID_WHITE_SPACEXML_SCHEMAP_NOATTR_NOREFXML_SCHEMAP_NOTATION_NO_NAMEXML_SCHEMAP_NOTYPE_NOREFXML_SCHEMAP_REF_AND_SUBTYPE$XML_SCHEMAP_RESTRICTION_NONAME_NOREFXML_SCHEMAP_SIMPLETYPE_NONAMEXML_SCHEMAP_TYPE_AND_SUBTYPEXML_SCHEMAP_UNKNOWN_ALL_CHILD&XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILDXML_SCHEMAP_UNKNOWN_ATTR_CHILD!XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD#XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUPXML_SCHEMAP_UNKNOWN_BASE_TYPE XML_SCHEMAP_UNKNOWN_CHOICE_CHILD(XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD%XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILDXML_SCHEMAP_UNKNOWN_ELEM_CHILD#XML_SCHEMAP_UNKNOWN_EXTENSION_CHILDXML_SCHEMAP_UNKNOWN_FACET_CHILDXML_SCHEMAP_UNKNOWN_FACET_TYPEXML_SCHEMAP_UNKNOWN_GROUP_CHILD XML_SCHEMAP_UNKNOWN_IMPORT_CHILDXML_SCHEMAP_UNKNOWN_LIST_CHILD"XML_SCHEMAP_UNKNOWN_NOTATION_CHILD(XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILDXML_SCHEMAP_UNKNOWN_REF%XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD!XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD"XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD'XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD$XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILDXML_SCHEMAP_UNKNOWN_TYPEXML_SCHEMAP_UNKNOWN_UNION_CHILDXML_SCHEMAP_ELEM_DEFAULT_FIXEDXML_SCHEMAP_REGEXP_INVALIDXML_SCHEMAP_FAILED_LOADXML_SCHEMAP_NOTHING_TO_PARSEXML_SCHEMAP_NOROOTXML_SCHEMAP_REDEFINED_GROUPXML_SCHEMAP_REDEFINED_TYPEXML_SCHEMAP_REDEFINED_ELEMENTXML_SCHEMAP_REDEFINED_ATTRGROUPXML_SCHEMAP_REDEFINED_ATTRXML_SCHEMAP_REDEFINED_NOTATIONXML_SCHEMAP_FAILED_PARSEXML_SCHEMAP_UNKNOWN_PREFIXXML_SCHEMAP_DEF_AND_PREFIX!XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD"XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI!XML_SCHEMAP_INCLUDE_SCHEMA_NO_URIXML_SCHEMAP_NOT_SCHEMAXML_SCHEMAP_UNKNOWN_MEMBER_TYPEXML_SCHEMAP_INVALID_ATTR_USEXML_SCHEMAP_RECURSIVE(XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE$XML_SCHEMAP_INVALID_ATTR_COMBINATION+XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION$XML_SCHEMAP_MISSING_SIMPLETYPE_CHILDXML_SCHEMAP_INVALID_ATTR_NAMEXML_SCHEMAP_REF_AND_CONTENTXML_SCHEMAP_CT_PROPS_CORRECT_1XML_SCHEMAP_CT_PROPS_CORRECT_2XML_SCHEMAP_CT_PROPS_CORRECT_3XML_SCHEMAP_CT_PROPS_CORRECT_4XML_SCHEMAP_CT_PROPS_CORRECT_5'XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2'XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3&XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER(XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE!XML_SCHEMAP_UNION_NOT_EXPRESSIBLEXML_SCHEMAP_SRC_IMPORT_3_1XML_SCHEMAP_SRC_IMPORT_3_2)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3XML_SCHEMAP_COS_CT_EXTENDS_1_3XML_SCHEMAV_NOROOTXML_SCHEMAV_UNDECLAREDELEMXML_SCHEMAV_NOTTOPLEVELXML_SCHEMAV_MISSINGXML_SCHEMAV_WRONGELEMXML_SCHEMAV_NOTYPEXML_SCHEMAV_NOROLLBACKXML_SCHEMAV_ISABSTRACTXML_SCHEMAV_NOTEMPTYXML_SCHEMAV_ELEMCONTXML_SCHEMAV_HAVEDEFAULTXML_SCHEMAV_NOTNILLABLEXML_SCHEMAV_EXTRACONTENTXML_SCHEMAV_INVALIDATTRXML_SCHEMAV_INVALIDELEMXML_SCHEMAV_NOTDETERMINISTXML_SCHEMAV_CONSTRUCTXML_SCHEMAV_INTERNALXML_SCHEMAV_NOTSIMPLEXML_SCHEMAV_ATTRUNKNOWNXML_SCHEMAV_ATTRINVALIDXML_SCHEMAV_VALUEXML_SCHEMAV_FACET$XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1$XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2$XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3XML_SCHEMAV_CVC_TYPE_3_1_1XML_SCHEMAV_CVC_TYPE_3_1_2XML_SCHEMAV_CVC_FACET_VALIDXML_SCHEMAV_CVC_LENGTH_VALIDXML_SCHEMAV_CVC_MINLENGTH_VALIDXML_SCHEMAV_CVC_MAXLENGTH_VALID"XML_SCHEMAV_CVC_MININCLUSIVE_VALID"XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID"XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID"XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID!XML_SCHEMAV_CVC_TOTALDIGITS_VALID$XML_SCHEMAV_CVC_FRACTIONDIGITS_VALIDXML_SCHEMAV_CVC_PATTERN_VALID!XML_SCHEMAV_CVC_ENUMERATION_VALID XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1 XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2 XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3 XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4XML_SCHEMAV_CVC_ELT_1XML_SCHEMAV_CVC_ELT_2XML_SCHEMAV_CVC_ELT_3_1XML_SCHEMAV_CVC_ELT_3_2_1XML_SCHEMAV_CVC_ELT_3_2_2XML_SCHEMAV_CVC_ELT_4_1XML_SCHEMAV_CVC_ELT_4_2XML_SCHEMAV_CVC_ELT_4_3XML_SCHEMAV_CVC_ELT_5_1_1XML_SCHEMAV_CVC_ELT_5_1_2XML_SCHEMAV_CVC_ELT_5_2_1XML_SCHEMAV_CVC_ELT_5_2_2_1XML_SCHEMAV_CVC_ELT_5_2_2_2_1XML_SCHEMAV_CVC_ELT_5_2_2_2_2XML_SCHEMAV_CVC_ELT_6XML_SCHEMAV_CVC_ELT_7XML_SCHEMAV_CVC_ATTRIBUTE_1XML_SCHEMAV_CVC_ATTRIBUTE_2XML_SCHEMAV_CVC_ATTRIBUTE_3XML_SCHEMAV_CVC_ATTRIBUTE_4 XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1"XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1"XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2XML_SCHEMAV_CVC_COMPLEX_TYPE_4 XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1 XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2XML_SCHEMAV_ELEMENT_CONTENT$XML_SCHEMAV_DOCUMENT_ELEMENT_MISSINGXML_SCHEMAV_CVC_COMPLEX_TYPE_1XML_SCHEMAV_CVC_AUXML_SCHEMAV_CVC_TYPE_1XML_SCHEMAV_CVC_TYPE_2XML_SCHEMAV_CVC_IDCXML_SCHEMAV_CVC_WILDCARDXML_SCHEMAV_MISCXML_XPTR_UNKNOWN_SCHEMEXML_XPTR_CHILDSEQ_STARTXML_XPTR_EVAL_FAILEDXML_XPTR_EXTRA_OBJECTSXML_C14N_CREATE_CTXTXML_C14N_REQUIRES_UTF8XML_C14N_CREATE_STACKXML_C14N_INVALID_NODEXML_C14N_UNKNOW_NODEXML_C14N_RELATIVE_NAMESPACEXML_FTP_PASV_ANSWERXML_FTP_EPSV_ANSWER XML_FTP_ACCNTXML_FTP_URL_SYNTAXXML_HTTP_URL_SYNTAXXML_HTTP_USE_IPXML_HTTP_UNKNOWN_HOSTXML_SCHEMAP_SRC_SIMPLE_TYPE_1XML_SCHEMAP_SRC_SIMPLE_TYPE_2XML_SCHEMAP_SRC_SIMPLE_TYPE_3XML_SCHEMAP_SRC_SIMPLE_TYPE_4XML_SCHEMAP_SRC_RESOLVE.XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE+XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE0XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPESXML_SCHEMAP_ST_PROPS_CORRECT_1XML_SCHEMAP_ST_PROPS_CORRECT_2XML_SCHEMAP_ST_PROPS_CORRECT_3 XML_SCHEMAP_COS_ST_RESTRICTS_1_1 XML_SCHEMAP_COS_ST_RESTRICTS_1_2"XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1"XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2 XML_SCHEMAP_COS_ST_RESTRICTS_2_1$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 XML_SCHEMAP_COS_ST_RESTRICTS_3_1"XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5!XML_SCHEMAP_COS_ST_DERIVED_OK_2_1!XML_SCHEMAP_COS_ST_DERIVED_OK_2_2 XML_SCHEMAP_S4S_ELEM_NOT_ALLOWEDXML_SCHEMAP_S4S_ELEM_MISSING XML_SCHEMAP_S4S_ATTR_NOT_ALLOWEDXML_SCHEMAP_S4S_ATTR_MISSING"XML_SCHEMAP_S4S_ATTR_INVALID_VALUEXML_SCHEMAP_SRC_ELEMENT_1XML_SCHEMAP_SRC_ELEMENT_2_1XML_SCHEMAP_SRC_ELEMENT_2_2XML_SCHEMAP_SRC_ELEMENT_3XML_SCHEMAP_P_PROPS_CORRECT_1XML_SCHEMAP_P_PROPS_CORRECT_2_1XML_SCHEMAP_P_PROPS_CORRECT_2_2XML_SCHEMAP_E_PROPS_CORRECT_2XML_SCHEMAP_E_PROPS_CORRECT_3XML_SCHEMAP_E_PROPS_CORRECT_4XML_SCHEMAP_E_PROPS_CORRECT_5XML_SCHEMAP_E_PROPS_CORRECT_6XML_SCHEMAP_SRC_INCLUDEXML_SCHEMAP_SRC_ATTRIBUTE_1XML_SCHEMAP_SRC_ATTRIBUTE_2XML_SCHEMAP_SRC_ATTRIBUTE_3_1XML_SCHEMAP_SRC_ATTRIBUTE_3_2XML_SCHEMAP_SRC_ATTRIBUTE_4XML_SCHEMAP_NO_XMLNSXML_SCHEMAP_NO_XSIXML_SCHEMAP_COS_VALID_DEFAULT_1!XML_SCHEMAP_COS_VALID_DEFAULT_2_1#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2XML_SCHEMAP_CVC_SIMPLE_TYPEXML_SCHEMAP_COS_CT_EXTENDS_1_1XML_SCHEMAP_SRC_IMPORT_1_1XML_SCHEMAP_SRC_IMPORT_1_2XML_SCHEMAP_SRC_IMPORT_2XML_SCHEMAP_SRC_IMPORT_2_1XML_SCHEMAP_SRC_IMPORT_2_2XML_SCHEMAP_INTERNALXML_SCHEMAP_NOT_DETERMINISTIC!XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1!XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2!XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3XML_SCHEMAP_MG_PROPS_CORRECT_1XML_SCHEMAP_MG_PROPS_CORRECT_2XML_SCHEMAP_SRC_CT_1+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3XML_SCHEMAP_AU_PROPS_CORRECT_2XML_SCHEMAP_A_PROPS_CORRECT_2XML_SCHEMAP_C_PROPS_CORRECTXML_SCHEMAP_SRC_REDEFINEXML_SCHEMAP_SRC_IMPORTXML_SCHEMAP_WARN_SKIP_SCHEMA!XML_SCHEMAP_WARN_UNLOCATED_SCHEMA!XML_SCHEMAP_WARN_ATTR_REDECL_PROH$XML_SCHEMAP_WARN_ATTR_POINTLESS_PROHXML_SCHEMAP_AG_PROPS_CORRECTXML_SCHEMAP_COS_CT_EXTENDS_1_2XML_SCHEMAP_AU_PROPS_CORRECTXML_SCHEMAP_A_PROPS_CORRECT_3XML_SCHEMAP_COS_ALL_LIMITEDXML_SCHEMATRONV_ASSERTXML_SCHEMATRONV_REPORTXML_MODULE_OPENXML_MODULE_CLOSEXML_CHECK_FOUND_ELEMENTXML_CHECK_FOUND_ATTRIBUTEXML_CHECK_FOUND_TEXTXML_CHECK_FOUND_CDATAXML_CHECK_FOUND_ENTITYREFXML_CHECK_FOUND_ENTITYXML_CHECK_FOUND_PIXML_CHECK_FOUND_COMMENTXML_CHECK_FOUND_DOCTYPEXML_CHECK_FOUND_FRAGMENTXML_CHECK_FOUND_NOTATIONXML_CHECK_UNKNOWN_NODEXML_CHECK_ENTITY_TYPEXML_CHECK_NO_PARENTXML_CHECK_NO_DOCXML_CHECK_NO_NAMEXML_CHECK_NO_ELEMXML_CHECK_WRONG_DOCXML_CHECK_NO_PREVXML_CHECK_WRONG_PREVXML_CHECK_NO_NEXTXML_CHECK_WRONG_NEXTXML_CHECK_NOT_DTDXML_CHECK_NOT_ATTRXML_CHECK_NOT_ATTR_DECLXML_CHECK_NOT_ELEM_DECLXML_CHECK_NOT_ENTITY_DECLXML_CHECK_NOT_NS_DECLXML_CHECK_NO_HREFXML_CHECK_WRONG_PARENTXML_CHECK_NS_SCOPEXML_CHECK_NS_ANCESTORXML_CHECK_NOT_UTF8XML_CHECK_NO_DICTXML_CHECK_NOT_NCNAMEXML_CHECK_OUTSIDE_DICTXML_CHECK_WRONG_NAMEXML_CHECK_NAME_NOT_NULLXML_I18N_NO_NAMEXML_I18N_NO_HANDLERXML_I18N_EXCESS_HANDLERXML_I18N_CONV_FAILEDXML_I18N_NO_OUTPUTXML_BUF_OVERFLOW XML_EXP_EMPTYXML_EXP_FORBID XML_EXP_ATOM XML_EXP_SEQ XML_EXP_OR XML_EXP_COUNTXML_ELEMENT_CONTENT_PCDATAXML_ELEMENT_CONTENT_ELEMENTXML_ELEMENT_CONTENT_SEQXML_ELEMENT_CONTENT_ORXML_PARSER_LOADDTDXML_PARSER_DEFAULTATTRSXML_PARSER_VALIDATEXML_PARSER_SUBST_ENTITIESXML_READER_TYPE_NONEXML_READER_TYPE_ELEMENTXML_READER_TYPE_ATTRIBUTEXML_READER_TYPE_TEXTXML_READER_TYPE_CDATA XML_READER_TYPE_ENTITY_REFERENCEXML_READER_TYPE_ENTITY&XML_READER_TYPE_PROCESSING_INSTRUCTIONXML_READER_TYPE_COMMENTXML_READER_TYPE_DOCUMENTXML_READER_TYPE_DOCUMENT_TYPE!XML_READER_TYPE_DOCUMENT_FRAGMENTXML_READER_TYPE_NOTATIONXML_READER_TYPE_WHITESPACE&XML_READER_TYPE_SIGNIFICANT_WHITESPACEXML_READER_TYPE_END_ELEMENTXML_READER_TYPE_END_ENTITYXML_READER_TYPE_XML_DECLARATIONXML_CATA_PREFER_NONEXML_CATA_PREFER_PUBLICXML_CATA_PREFER_SYSTEMXML_ELEMENT_NODEXML_ATTRIBUTE_NODE XML_TEXT_NODEXML_CDATA_SECTION_NODEXML_ENTITY_REF_NODEXML_ENTITY_NODE XML_PI_NODEXML_COMMENT_NODEXML_DOCUMENT_NODEXML_DOCUMENT_TYPE_NODEXML_DOCUMENT_FRAG_NODEXML_NOTATION_NODEXML_HTML_DOCUMENT_NODE XML_DTD_NODEXML_ELEMENT_DECLXML_ATTRIBUTE_DECLXML_ENTITY_DECLXML_NAMESPACE_DECLXML_XINCLUDE_STARTXML_XINCLUDE_ENDXML_DOCB_DOCUMENT_NODEXLINK_ACTUATE_NONEXLINK_ACTUATE_AUTOXLINK_ACTUATE_ONREQUESTXML_WITH_THREAD XML_WITH_TREEXML_WITH_OUTPUT XML_WITH_PUSHXML_WITH_READERXML_WITH_PATTERNXML_WITH_WRITER XML_WITH_SAX1 XML_WITH_FTP XML_WITH_HTTPXML_WITH_VALID XML_WITH_HTMLXML_WITH_LEGACY XML_WITH_C14NXML_WITH_CATALOGXML_WITH_XPATH XML_WITH_XPTRXML_WITH_XINCLUDEXML_WITH_ICONVXML_WITH_ISO8859XXML_WITH_UNICODEXML_WITH_REGEXPXML_WITH_AUTOMATA XML_WITH_EXPRXML_WITH_SCHEMASXML_WITH_SCHEMATRONXML_WITH_MODULESXML_WITH_DEBUGXML_WITH_DEBUG_MEMXML_WITH_DEBUG_RUN XML_WITH_ZLIB XML_WITH_ICU XML_WITH_LZMA XML_WITH_NONEXML_ELEMENT_CONTENT_ONCEXML_ELEMENT_CONTENT_OPTXML_ELEMENT_CONTENT_MULTXML_ELEMENT_CONTENT_PLUSXPATH_EXPRESSION_OKXPATH_NUMBER_ERRORXPATH_UNFINISHED_LITERAL_ERRORXPATH_START_LITERAL_ERRORXPATH_VARIABLE_REF_ERRORXPATH_UNDEF_VARIABLE_ERRORXPATH_INVALID_PREDICATE_ERRORXPATH_EXPR_ERRORXPATH_UNCLOSED_ERRORXPATH_UNKNOWN_FUNC_ERRORXPATH_INVALID_OPERANDXPATH_INVALID_TYPEXPATH_INVALID_ARITYXPATH_INVALID_CTXT_SIZEXPATH_INVALID_CTXT_POSITIONXPATH_MEMORY_ERRORXPTR_SYNTAX_ERRORXPTR_RESOURCE_ERRORXPTR_SUB_RESOURCE_ERRORXPATH_UNDEF_PREFIX_ERRORXPATH_ENCODING_ERRORXPATH_INVALID_CHAR_ERRORXPATH_INVALID_CTXTXPATH_STACK_ERRORXPATH_FORBID_VARIABLE_ERRORXPATH_OP_LIMIT_EXCEEDEDXPATH_RECURSION_LIMIT_EXCEEDEDXML_TEXTREADER_MODE_INITIALXML_TEXTREADER_MODE_INTERACTIVEXML_TEXTREADER_MODE_ERRORXML_TEXTREADER_MODE_EOFXML_TEXTREADER_MODE_CLOSEDXML_TEXTREADER_MODE_READING XML_ERR_NONEXML_ERR_WARNING XML_ERR_ERROR XML_ERR_FATALXML_CHAR_ENCODING_ERRORXML_CHAR_ENCODING_NONEXML_CHAR_ENCODING_UTF8XML_CHAR_ENCODING_UTF16LEXML_CHAR_ENCODING_UTF16BEXML_CHAR_ENCODING_UCS4LEXML_CHAR_ENCODING_UCS4BEXML_CHAR_ENCODING_EBCDICXML_CHAR_ENCODING_UCS4_2143XML_CHAR_ENCODING_UCS4_3412XML_CHAR_ENCODING_UCS2XML_CHAR_ENCODING_8859_1XML_CHAR_ENCODING_8859_2XML_CHAR_ENCODING_8859_3XML_CHAR_ENCODING_8859_4XML_CHAR_ENCODING_8859_5XML_CHAR_ENCODING_8859_6XML_CHAR_ENCODING_8859_7XML_CHAR_ENCODING_8859_8XML_CHAR_ENCODING_8859_9XML_CHAR_ENCODING_2022_JPXML_CHAR_ENCODING_SHIFT_JISXML_CHAR_ENCODING_EUC_JPXML_CHAR_ENCODING_ASCII XML_FROM_NONEXML_FROM_PARSER XML_FROM_TREEXML_FROM_NAMESPACE XML_FROM_DTD XML_FROM_HTMLXML_FROM_MEMORYXML_FROM_OUTPUT XML_FROM_IO XML_FROM_FTP XML_FROM_HTTPXML_FROM_XINCLUDEXML_FROM_XPATHXML_FROM_XPOINTERXML_FROM_REGEXPXML_FROM_DATATYPEXML_FROM_SCHEMASPXML_FROM_SCHEMASVXML_FROM_RELAXNGPXML_FROM_RELAXNGVXML_FROM_CATALOG XML_FROM_C14N XML_FROM_XSLTXML_FROM_VALIDXML_FROM_CHECKXML_FROM_WRITERXML_FROM_MODULE XML_FROM_I18NXML_FROM_SCHEMATRONVXML_FROM_BUFFER XML_FROM_URIHTML_NA HTML_INVALIDHTML_DEPRECATED HTML_VALID HTML_REQUIREDXML_SCHEMA_VAL_VC_I_CREATEXML_SCHEMA_WHITESPACE_UNKNOWNXML_SCHEMA_WHITESPACE_PRESERVEXML_SCHEMA_WHITESPACE_REPLACEXML_SCHEMA_WHITESPACE_COLLAPSEHTML_PARSE_RECOVERHTML_PARSE_NODEFDTDHTML_PARSE_NOERRORHTML_PARSE_NOWARNINGHTML_PARSE_PEDANTICHTML_PARSE_NOBLANKSHTML_PARSE_NONETHTML_PARSE_NOIMPLIEDHTML_PARSE_COMPACTHTML_PARSE_IGNORE_ENCXML_RELAXNG_OKXML_RELAXNG_ERR_MEMORYXML_RELAXNG_ERR_TYPEXML_RELAXNG_ERR_TYPEVALXML_RELAXNG_ERR_DUPIDXML_RELAXNG_ERR_TYPECMPXML_RELAXNG_ERR_NOSTATEXML_RELAXNG_ERR_NODEFINEXML_RELAXNG_ERR_LISTEXTRAXML_RELAXNG_ERR_LISTEMPTYXML_RELAXNG_ERR_INTERNODATAXML_RELAXNG_ERR_INTERSEQXML_RELAXNG_ERR_INTEREXTRAXML_RELAXNG_ERR_ELEMNAMEXML_RELAXNG_ERR_ATTRNAMEXML_RELAXNG_ERR_ELEMNONSXML_RELAXNG_ERR_ATTRNONSXML_RELAXNG_ERR_ELEMWRONGNSXML_RELAXNG_ERR_ATTRWRONGNSXML_RELAXNG_ERR_ELEMEXTRANSXML_RELAXNG_ERR_ATTREXTRANSXML_RELAXNG_ERR_ELEMNOTEMPTYXML_RELAXNG_ERR_NOELEMXML_RELAXNG_ERR_NOTELEMXML_RELAXNG_ERR_ATTRVALIDXML_RELAXNG_ERR_CONTENTVALIDXML_RELAXNG_ERR_EXTRACONTENTXML_RELAXNG_ERR_INVALIDATTRXML_RELAXNG_ERR_DATAELEMXML_RELAXNG_ERR_VALELEMXML_RELAXNG_ERR_LISTELEMXML_RELAXNG_ERR_DATATYPEXML_RELAXNG_ERR_VALUEXML_RELAXNG_ERR_LISTXML_RELAXNG_ERR_NOGRAMMARXML_RELAXNG_ERR_EXTRADATAXML_RELAXNG_ERR_LACKDATAXML_RELAXNG_ERR_INTERNALXML_RELAXNG_ERR_ELEMWRONGXML_RELAXNG_ERR_TEXTWRONGXML_CATA_ALLOW_NONEXML_CATA_ALLOW_GLOBALXML_CATA_ALLOW_DOCUMENTXML_CATA_ALLOW_ALLXML_ATTRIBUTE_CDATAXML_ATTRIBUTE_IDXML_ATTRIBUTE_IDREFXML_ATTRIBUTE_IDREFSXML_ATTRIBUTE_ENTITYXML_ATTRIBUTE_ENTITIESXML_ATTRIBUTE_NMTOKENXML_ATTRIBUTE_NMTOKENSXML_ATTRIBUTE_ENUMERATIONXML_ATTRIBUTE_NOTATIONXML_SCHEMATRON_OUT_QUIETXML_SCHEMATRON_OUT_TEXTXML_SCHEMATRON_OUT_XMLXML_SCHEMATRON_OUT_ERRORXML_SCHEMATRON_OUT_FILEXML_SCHEMATRON_OUT_BUFFERXML_SCHEMATRON_OUT_IOXML_SCHEMA_CONTENT_UNKNOWNXML_SCHEMA_CONTENT_EMPTYXML_SCHEMA_CONTENT_ELEMENTSXML_SCHEMA_CONTENT_MIXEDXML_SCHEMA_CONTENT_SIMPLE$XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTSXML_SCHEMA_CONTENT_BASICXML_SCHEMA_CONTENT_ANYXML_SCHEMA_TYPE_BASICXML_SCHEMA_TYPE_ANYXML_SCHEMA_TYPE_FACETXML_SCHEMA_TYPE_SIMPLEXML_SCHEMA_TYPE_COMPLEXXML_SCHEMA_TYPE_SEQUENCEXML_SCHEMA_TYPE_CHOICEXML_SCHEMA_TYPE_ALLXML_SCHEMA_TYPE_SIMPLE_CONTENTXML_SCHEMA_TYPE_COMPLEX_CONTENTXML_SCHEMA_TYPE_URXML_SCHEMA_TYPE_RESTRICTIONXML_SCHEMA_TYPE_EXTENSIONXML_SCHEMA_TYPE_ELEMENTXML_SCHEMA_TYPE_ATTRIBUTEXML_SCHEMA_TYPE_ATTRIBUTEGROUPXML_SCHEMA_TYPE_GROUPXML_SCHEMA_TYPE_NOTATIONXML_SCHEMA_TYPE_LISTXML_SCHEMA_TYPE_UNIONXML_SCHEMA_TYPE_ANY_ATTRIBUTEXML_SCHEMA_TYPE_IDC_UNIQUEXML_SCHEMA_TYPE_IDC_KEYXML_SCHEMA_TYPE_IDC_KEYREFXML_SCHEMA_TYPE_PARTICLEXML_SCHEMA_TYPE_ATTRIBUTE_USEXML_SCHEMA_FACET_MININCLUSIVEXML_SCHEMA_FACET_MINEXCLUSIVEXML_SCHEMA_FACET_MAXINCLUSIVEXML_SCHEMA_FACET_MAXEXCLUSIVEXML_SCHEMA_FACET_TOTALDIGITSXML_SCHEMA_FACET_FRACTIONDIGITSXML_SCHEMA_FACET_PATTERNXML_SCHEMA_FACET_ENUMERATIONXML_SCHEMA_FACET_WHITESPACEXML_SCHEMA_FACET_LENGTHXML_SCHEMA_FACET_MAXLENGTHXML_SCHEMA_FACET_MINLENGTHXML_SCHEMA_EXTRA_QNAMEREF XML_SCHEMA_EXTRA_ATTR_USE_PROHIBXML_MODULE_LAZYXML_MODULE_LOCALXML_PARSE_UNKNOWN XML_PARSE_DOM XML_PARSE_SAXXML_PARSE_PUSH_DOMXML_PARSE_PUSH_SAXXML_PARSE_READER XML_C14N_1_0XML_C14N_EXCLUSIVE_1_0 XML_C14N_1_1XML_PARSE_RECOVERXML_PARSE_NOENTXML_PARSE_DTDLOADXML_PARSE_DTDATTRXML_PARSE_DTDVALIDXML_PARSE_NOERRORXML_PARSE_NOWARNINGXML_PARSE_PEDANTICXML_PARSE_NOBLANKSXML_PARSE_SAX1XML_PARSE_XINCLUDEXML_PARSE_NONETXML_PARSE_NODICTXML_PARSE_NSCLEANXML_PARSE_NOCDATAXML_PARSE_NOXINCNODEXML_PARSE_COMPACTXML_PARSE_OLD10XML_PARSE_NOBASEFIXXML_PARSE_HUGEXML_PARSE_OLDSAXXML_PARSE_IGNORE_ENCXML_PARSE_BIG_LINESXML_ELEMENT_TYPE_UNDEFINEDXML_ELEMENT_TYPE_EMPTYXML_ELEMENT_TYPE_ANYXML_ELEMENT_TYPE_MIXEDXML_ELEMENT_TYPE_ELEMENTXML_DOC_WELLFORMEDXML_DOC_NSVALID XML_DOC_OLD10XML_DOC_DTDVALIDXML_DOC_XINCLUDEXML_DOC_USERBUILTXML_DOC_INTERNAL XML_DOC_HTMLXLINK_TYPE_NONEXLINK_TYPE_SIMPLEXLINK_TYPE_EXTENDEDXLINK_TYPE_EXTENDED_SETXPATH_UNDEFINED XPATH_NODESET XPATH_BOOLEAN XPATH_NUMBER XPATH_STRING XPATH_POINT XPATH_RANGEXPATH_LOCATIONSET XPATH_USERSXPATH_XSLT_TREEXML_SCHEMAS_ERR_OKXML_SCHEMAS_ERR_NOROOTXML_SCHEMAS_ERR_UNDECLAREDELEMXML_SCHEMAS_ERR_NOTTOPLEVELXML_SCHEMAS_ERR_MISSINGXML_SCHEMAS_ERR_WRONGELEMXML_SCHEMAS_ERR_NOTYPEXML_SCHEMAS_ERR_NOROLLBACKXML_SCHEMAS_ERR_ISABSTRACTXML_SCHEMAS_ERR_NOTEMPTYXML_SCHEMAS_ERR_ELEMCONTXML_SCHEMAS_ERR_HAVEDEFAULTXML_SCHEMAS_ERR_NOTNILLABLEXML_SCHEMAS_ERR_EXTRACONTENTXML_SCHEMAS_ERR_INVALIDATTRXML_SCHEMAS_ERR_INVALIDELEMXML_SCHEMAS_ERR_NOTDETERMINISTXML_SCHEMAS_ERR_CONSTRUCTXML_SCHEMAS_ERR_INTERNALXML_SCHEMAS_ERR_NOTSIMPLEXML_SCHEMAS_ERR_ATTRUNKNOWNXML_SCHEMAS_ERR_ATTRINVALIDXML_SCHEMAS_ERR_VALUEXML_SCHEMAS_ERR_FACETXML_SCHEMAS_ERR_XML_SCHEMAS_ERR_XXXrrrrsF   +/i   #                 "                                                                                                      99N <B 3-b:.F*M;z0%E