Your IP : 3.140.198.3


Current Path : /lib64/python3.6/site-packages/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/__pycache__/libxml2.cpython-36.pyc

3

�Y�F�@s�9ddlZddlZddlZGdd�de�Zdd�Zdd�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�Z	Gdd�de�Z
Gdd�d�ZGdd�de�ZGdd�de�Z
Gdd�d�ZGdd�d�ZGdd�d�ZGdd�d�Zdd�Zd d!�Zd"d#�Zd$Zd%Zd&Zd'Zd$Zd%Zd&Zd'Zd(d)�ZGd*d+�d+�ZGd,d-�d-�ZGd.d/�d/�Z Gd0d1�d1�Z!d2d3�Z"Gd4d5�d5�Z#d6d7�Z$gZ%d8d9�Z&d:d;�Z'd<d=�Z(d>d?�Z)d@dA�Z*dBdC�Z+dDdE�Z,dFdG�Z-dHdI�Z.dJdK�Z/dLdM�Z0dNdO�Z1dPdQ�Z2dRdS�Z3dTdU�Z4dVdW�Z5dXdY�Z6dZd[�Z7d\d]�Z8d^d_�Z9d`da�Z:dbdc�Z;ddde�Z<dfdg�Z=dhdi�Z>djdk�Z?dldm�Z@dndo�ZAdpdq�ZBdrds�ZCdtdu�ZDdvdw�ZEdxdy�ZFdzd{�ZGd|d}�ZHd~d�ZId�d��ZJd�d��ZKd�d��ZLd�d��ZMd�d��ZNd�d��ZOd�d��ZPd�d��ZQd�d��ZRd�d��ZSd�d��ZTd�d��ZUd�d��ZVd�d��ZWd�d��ZXd�d��ZYd�d��ZZd�d��Z[d�d��Z\d�d��Z]d�d��Z^d�d��Z_d�d��Z`d�d��Zad�d��Zbd�d��Zcd�d��Zdd�d��Zed�d��Zfd�d��Zgd�d��Zhd�d��Zid�d��Zjd�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߄Zyd�d�Zzd�d�Z{d�d�Z|d�d�Z}d�d�Z~d�d�Zd�d�Z�d�d�Z�d�d�Z�d�d�Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d�d	�Z��d
�d�Z��d�d
�Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d �d!�Z��d"�d#�Z��d$�d%�Z��d&�d'�Z��d(�d)�Z��d*�d+�Z��d,�d-�Z��d.�d/�Z��d0�d1�Z��d2�d3�Z��d4�d5�Z��d6�d7�Z��d8�d9�Z��d:�d;�Z��d<�d=�Z��d>�d?�Z��d@�dA�Z��dB�dC�Z��dD�dE�Z��dF�dG�Z��dH�dI�Z��dJ�dK�Z��dL�dM�Z��dN�dO�Z��dP�dQ�Z��dR�dS�Z��dT�dU�Z��dV�dW�Z��dX�dY�Z��dZ�d[�Z��d\�d]�Z��d^�d_�Z��d`�da�Z��db�dc�Z��dd�de�Z��df�dg�Z��dh�di�Z��dj�dk�Z��dl�dm�Z��dn�do�Z��dp�dq�Zdr�ds�ZÐdt�du�ZĐdv�dw�ZŐdx�dy�ZƐdz�d{�Zǐd|�d}�ZȐd~�d�Zɐd��d��Zʐd��d��Zːd��d��Z̐d��d��Z͐d��d��Zΐd��d��Zϐd��d��ZАd��d��Zѐd��d��ZҐd��d��ZӐd��d��ZԐd��d��ZՐd��d��Z֐d��d��Zאd��d��Zؐd��d��Zِd��d��Zڐd��d��Zېd��d��Zܐd��d��Zݐd��d��Zސd��d��Zߐd��d��Z�d��d��Z�d��d��Z�d��d��Z�d��d��Z�d��d��Z�d��d��Z�d��d��Z�d��d��Z�d��d��Z�d��d��Z�ddÄZ�dĐdńZ�dƐdDŽZ�dȐdɄZ�dʐd˄Z�d̐d̈́Z�dΐdτZ�dАdфZ�dҐdӄZ�dԐdՄZ�d֐dׄZ��dؐdلZ��dڐdۄZ��dܐd݄Z��dސd߄Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d�d�Z��d�d��Z�d�d��Z�d�d��Z�d�d��Z�d�d���Z�d��d���Z�d��d���Z�d��d���Z�d��d���Z�d��d���Z	�d�d��Z
�d�d��Z�d�d��Z�d�d��Z
�d�d	��Z�d
�d��Z�d�d
��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�d�d��Z�d �d!��Z�d"�d#��Z�d$�d%��Z�d&�d'��Z�d(�d)��Z�d*�d+��Z�d,�d-��Z �d.�d/��Z!�d0�d1��Z"�d2�d3��Z#�d4�d5��Z$�d6�d7��Z%�d8�d9��Z&�d:�d;��Z'�d<�d=��Z(�d>�d?��Z)�d@�dA��Z*�dB�dC��Z+�dD�dE��Z,�dF�dG��Z-�dH�dI��Z.�dJ�dK��Z/�dL�dM��Z0�dN�dO��Z1�dP�dQ��Z2�dR�dS��Z3�dT�dU��Z4�dV�dW��Z5�dX�dY��Z6�dZ�d[��Z7�d\�d]��Z8�d^�d_��Z9�d`�da��Z:�db�dc��Z;�dd�de��Z<�df�dg��Z=�dh�di��Z>�dj�dk��Z?�dl�dm��Z@�dn�do��ZA�dp�dq��ZB�dr�ds��ZC�dt�du��ZD�dv�dw��ZE�dx�dy��ZF�dz�d{��ZG�d|�d}��ZH�d~�d��ZI�d��d���ZJ�d��d���ZK�d��d���ZL�d��d���ZM�d��d���ZN�d��d���ZO�d��d���ZP�d��d���ZQ�d��d���ZR�d��d���ZS�d��d���ZT�d��d���ZU�d��d���ZV�d��d���ZW�d��d���ZX�d��d���ZY�d��d���ZZ�d��d���Z[�d��d���Z\�d��d���Z]�d��d���Z^�d��d���Z_�d��d���Z`�d��d���Za�d��d���Zb�d��d���Zc�d��d���Zd�d��d���Ze�d��d���Zf�d��d���Zg�d��d���Zh�d��d���Zi�d��d���Zj�ddÄ�Zk�dĐdń�Zl�dƐdDŽ�Zm�dȐdɄ�Zn�dʐd˄�Zo�d̐d̈́�Zp�dΐdτ�Zq�dАdф�Zr�dҐdӄ�Zs�dԐdՄ�Zt�d֐dׄ�Zu�dؐdل�Zv�dڐdۄ�Zw�dܐd݄�Zx�dސd߄�Zy�d�d��Zz�d�d��Z{�d�d��Z|�d�d��Z}�d�d��Z~�d�d��Z�d�d��Z��d�d��Z��d�d��Z��d�d��Z��d�d���Z��d��d���Z��d��d���Z��d��d���Z��d��d���Z��d��d���Z��d�d��Z��d�d��Z��d�d��Z��d�d��Z��d�d	��Z�G�d
�d��de��Z�G�d�d
��d
�e���Z�G�d�d��de��Z�G�d�d��d�e���Z�G�d�d��d�e���Z�G�d�d��d��Z�G�d�d��d�e���Z�G�d�d��d�e���Z�G�d�d��d�e���Z�G�d�d��d��Z�G�d�d��d�e���Z�G�d �d!��d!e
��Z�G�d"�d#��d#e��Z�G�d$�d%��d%��Z�G�d&�d'��d'��Z�G�d(�d)��d)��Z�G�d*�d+��d+e!��Z�G�d,�d-��d-��Z�G�d.�d/��d/��Z�G�d0�d1��d1e ��Z�G�d2�d3��d3��Z�G�d4�d5��d5e#��Z�G�d6�d7��d7��Z�G�d8�d9��d9e��Z�G�d:�d;��d;��Z�G�d<�d=��d=��Z�d�Z�d$�Z�d%�Z�d&�Z�d�Z�d$�Z�d%�Z�d$�Z�d%�Z�d&�Z�d'�Z��d>�Z��d?�Z�d$�Z�d%�Z�d&�Z�d'�Z�d$�Z�d%�Z�d&�Z�d'�Z�d�Z�d$�Z�d%�Z�d&�Z�d'�Zd>�ZÐd?�ZĐd@�ZŐdA�ZƐdB�ZǐdC�ZȐdD�ZɐdE�ZʐdF�ZːdG�Z̐dH�Z͐dI�ZΐdJ�ZϐdK�ZАdL�ZѐdM�ZҐdN�ZӐdO�ZԐdP�ZՐdQ�Z֐dR�ZאdS�ZؐdT�ZِdU�ZڐdV�ZېdW�ZܐdX�ZݐdY�ZސdZ�Zߐd[�Z�d\�Z�d]�Z�d^�Z�d_�Z�d`�Z�da�Z�db�Z�dc�Z�dd�Z�de�Z�df�Z�dg�Z�d&�Z�d�Z�d$�Z�d%�Z�d&�Z�d'�Z�d>�Z�d?�Z�d@�Z��dA�Z��dB�Z��dC�Z��dD�Z��dE�Z��dF�Z��dG�Z��dH�Z��dI�Z�d$�Z�d%�Zd&�Zd'�Z�d>�Z�d?�Zd$�Zd%�Zd'�Z�dA�Z�dI�Z	�dY�Z
�dh�Z�di�Zd�Z
d$�Zd%�Zd'�Zd�Zd$�Zd%�Zd&�Zd'�Z�d>�Z�d?�Z�d@�Z�dA�Z�dB�Z�dC�Z�dD�Z�dE�Z�dF�Z�dG�Z�dH�Z �dI�Z!�dJ�Z"�dK�Z#�dL�Z$�dM�Z%�dN�Z&�dO�Z'�dP�Z(�dQ�Z)�dR�Z*�dS�Z+�dT�Z,�dU�Z-�dV�Z.�dW�Z/�dX�Z0�dY�Z1�dZ�Z2�d[�Z3�d\�Z4�d]�Z5�d^�Z6�d_�Z7�d`�Z8�da�Z9�db�Z:�dc�Z;�dd�Z<�de�Z=�df�Z>�dg�Z?�dj�Z@�dk�ZA�dl�ZB�dm�ZC�dn�ZD�do�ZE�dp�ZF�dq�ZG�dr�ZH�ds�ZI�dt�ZJ�du�ZK�dv�ZL�dw�ZM�dx�ZN�dy�ZO�dz�ZP�dh�ZQ�d{�ZR�d|�ZS�d}�ZT�d~�ZU�d�ZV�d��ZW�d��ZX�d��ZY�d��ZZ�d��Z[�d��Z\�d��Z]�d��Z^�d��Z_�d��Z`�d��Za�d��Zb�d��Zc�d��Zd�d��Ze�d��Zf�d��Zg�d��Zh�d��Zi�d��Zj�d��Zk�d��Zl�d��Zm�d��Zn�d��Zo�d��Zp�d��Zq�d��Zr�d��Zs�d��Zt�d��Zu�d��Zv�d��Zw�d��Zx�d��Zy�d��Zz�d��Z{�d��Z|�d��Z}�d��Z~�d��Z�d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��dZ��dÐZ��dĐZ��dŐZ��dƐZ��dǐZ��dȐZ��dɐZ��dʐZ��dːZ��d̐Z��d͐Z��dΐZ��dϐZ��dАZ��dѐZ��dҐZ��dӐZ��dԐZ��dՐZ��d֐Z��dאZ��dؐZ��dِZ��dڐZ��dېZ��dܐZ��dݐZ��dސZ��dߐZ��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Zd�ZÐd�ZĐd�ZŐd�ZƐd�Zǐd�ZȐd�Zɐd�Zʐd�Zːd��Z̐d��Z͐d��Zΐd��Zϐd��ZАd��Zѐd��ZҐd��ZӐd��ZԐd��ZՐd��Z֐d�Zאd�Zؐd�Zِd�Zڐd�Zېd�Zܐd�Zݐd�Zސd�Zߐd	�Z�d
�Z�d�Z�d�Z�d
�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z��d�Z��d �Z��d!�Z��d"�Z��d#�Z��d$�Z��d%�Z��d&�Z��d'�Z��d(�Z��d)�Z�d*�Z�d+�Z�d,�Z�d-�Z�d.�Z�d/�Z�d0�Z�d1�Z�d2�Z	�d3�Z
�d4�Z�d5�Z�d6�Z
�d7�Z�d8�Z�d9�Z�d:�Z�d;�Z�d<�Z�d=�Z�d>�Z�d?�Z�d@�Z�dA�Z�dB�Z�dC�Z�dD�Z�dE�Z�dF�Z�dG�Z�dH�Z�dI�Z �dJ�Z!�dK�Z"�dL�Z#�dM�Z$�dN�Z%�dO�Z&�dP�Z'�dQ�Z(�dR�Z)�dS�Z*�dT�Z+�dU�Z,�dV�Z-�dW�Z.�dX�Z/�dY�Z0�dZ�Z1�d[�Z2�d\�Z3�d]�Z4�d^�Z5�d_�Z6�d`�Z7�da�Z8�db�Z9�dc�Z:�dd�Z;�de�Z<�df�Z=�dg�Z>�dh�Z?�di�Z@�dj�ZA�dk�ZB�dl�ZC�dm�ZD�dn�ZE�do�ZF�dp�ZG�dq�ZH�dr�ZI�ds�ZJ�dt�ZK�du�ZL�dv�ZM�dw�ZN�dx�ZO�dy�ZP�dz�ZQ�d{�ZR�d|�ZS�d}�ZT�d~�ZU�d�ZV�d��ZW�d��ZX�d��ZY�d��ZZ�d��Z[�d��Z\�d��Z]�d��Z^�d��Z_�d��Z`�d��Za�d��Zb�d��Zc�d��Zd�d��Ze�d��Zf�d��Zg�d��Zh�d��Zi�d��Zj�d��Zk�d��Zl�d��Zm�d��Zn�d��Zo�d��Zp�d��Zq�d��Zr�d��Zs�d��Zt�d��Zu�d��Zv�d��Zw�d��Zx�d��Zy�d��Zz�d��Z{�d��Z|�d��Z}�d��Z~�d��Z�d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��dZ��dÐZ��dĐZ��dŐZ��dƐZ��dǐZ��dȐZ��dɐZ��dʐZ��dːZ��d̐Z��d͐Z��dΐZ��dϐZ��dАZ��dѐZ��dҐZ��dӐZ��dԐZ��dՐZ��d֐Z��dאZ��dؐZ��dِZ��dڐZ��dېZ��dܐZ��dݐZ��dސZ��dߐZ��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Zd�ZÐd�ZĐd�ZŐd�ZƐd�Zǐd�ZȐd�Zɐd�Zʐd�Zːd��Z̐d��Z͐d��Zΐd��Zϐd��ZАd��Zѐd��ZҐd��ZӐd��ZԐd��ZՐd��Z֐d�Zאd�Zؐd�Zِd�Zڐd�Zېd�Zܐd�Zݐd�Zސd�Zߐd	�Z�d
�Z�d�Z�d�Z�d
�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z��d�Z��d �Z��d!�Z��d"�Z��d#�Z��d$�Z��d%�Z��d&�Z��d'�Z��d(�Z��d)�Z�d*�Z�d+�Z�d,�Z�d-�Z�d.�Z�d/�Z�d0�Z�d1�Z�d2�Z	�d3�Z
�d4�Z�d5�Z�d6�Z
�d7�Z�d8�Z�d9�Z�d:�Z�d;�Z�d<�Z�d=�Z�d>�Z�d?�Z�d@�Z�dA�Z�dB�Z�dC�Z�dD�Z�dE�Z�dF�Z�dG�Z�dH�Z�dI�Z �dJ�Z!�dK�Z"�dL�Z#�dM�Z$�dN�Z%�dO�Z&�dP�Z'�dQ�Z(�dR�Z)�dS�Z*�dT�Z+�dU�Z,�dV�Z-�dW�Z.�dX�Z/�dY�Z0�dZ�Z1�d[�Z2�d\�Z3�d]�Z4�d^�Z5�d_�Z6�d`�Z7�da�Z8�db�Z9�dc�Z:�dd�Z;�de�Z<�df�Z=�dg�Z>�dh�Z?�di�Z@�dj�ZA�dk�ZB�dl�ZC�dm�ZD�dn�ZE�do�ZF�dp�ZG�dq�ZH�dr�ZI�ds�ZJ�dt�ZK�du�ZL�dv�ZM�dw�ZN�dx�ZO�dy�ZP�dz�ZQ�d{�ZR�d|�ZS�d}�ZT�d~�ZU�d�ZV�d��ZW�d��ZX�d��ZY�d��ZZ�d��Z[�d��Z\�d��Z]�d��Z^�d��Z_�d��Z`�d��Za�d��Zb�d��Zc�d��Zd�d��Ze�d��Zf�d��Zg�d��Zh�d��Zi�d��Zj�d��Zk�d��Zl�d��Zm�d��Zn�d��Zo�d��Zp�d��Zq�d��Zr�d��Zs�d��Zt�d��Zu�d��Zv�d��Zw�d��Zx�d��Zy�d��Zz�d��Z{�d��Z|�d��Z}�d��Z~�d��Z�d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��d��Z��dZ��dÐZ��dĐZ��dŐZ��dƐZ��dǐZ��dȐZ��dɐZ��dʐZ��dːZ��d̐Z��d͐Z��dΐZ��dϐZ��dАZ��dѐZ��dҐZ��dӐZ��dԐZ��dՐZ��d֐Z��dאZ��dؐZ��dِZ��dڐZ��dېZ��dܐZ��dݐZ��dސZ��dߐZ��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Z��d�Zd�ZÐd�ZĐd�ZŐd�ZƐd�Zǐd�ZȐd�Zɐd�Zʐd�Zːd��Z̐d��Z͐d��Zΐd��Zϐd��ZАd��Zѐd��ZҐd��ZӐd��ZԐd��ZՐd��Z֐d�Zאd�Zؐd�Zِd�Zڐd�Zېd�Zܐd�Zݐd�Zސd�Zߐd	�Z�d
�Z�d�Z�d�Z�d
�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d�Z�d$�Z�d%�Z�d&�Z�d'�Z�d>�Z�d$�Z�d%�Z�d&�Z�d'�Z�d$�Z�d%�Z�d&�Z�d'�Z�d�Z�d$�Z�d%�Z�d&�Zd'�Z�d>�Z�d?�Z�d@�Z�dA�Z�dB�Z�dC�Z�dD�Z�dE�Z	�dF�Z
�dG�Z�dH�Z�dI�Z
�dJ�Zd�Zd$�Zd%�Zd$�Zd%�Zd&�Zd'�Z�d>�Z�d?�Z�d@�Z�dA�Z�dB�Z�dC�Z�dD�Z�dE�Z�dF�Z�dG�Z�dH�Z �dI�Z!�dJ�Z"�dK�Z#�dL�Z$�dM�Z%�dN�Z&d�Z'd$�Z(d%�Z)d$�Z*d%�Z+d&�Z,d'�Z-�d>�Z.�d?�Z/�d@�Z0�dA�Z1�dB�Z2�dC�Z3�dD�Z4�dE�Z5�dF�Z6�dG�Z7�dH�Z8�dI�Z9�dJ�Z:�dK�Z;�dL�Z<�dM�Z=�dN�Z>�dO�Z?�dP�Z@�dQ�ZA�dR�ZB�dS�ZC�dT�ZD�dU�ZE�dV�ZF�dW�ZG�dX�ZH�dY�ZI�dZ�ZJ�d�ZKd$�ZLd%�ZMd&�ZNd'�ZOd�ZPd$�ZQd%�ZRd&�ZSd'�ZT�d>�ZU�d?�ZV�d@�ZW�dA�ZX�dB�ZY�dC�ZZ�dD�Z[�dE�Z\�dF�Z]�dG�Z^�dH�Z_�dI�Z`�dJ�Za�dK�Zb�dL�Zc�dM�Zd�dN�Ze�dO�Zf�dP�Zg�dQ�Zhd�Zid$�Zjd%�Zkd&�Zld'�Zm�d>�Znd�Zod$�Zpd%�Zqd&�Zr�d'�Zsd�Ztd$�Zud%�Zvd&�Zwd'�Zx�d>�Zy�d?�Zz�d@�Z{�dA�Z|�dB�Z}�dC�Z~�dD�Z�dE�Z��dF�Z��dG�Z��dH�Z��dI�Z��dJ�Z��dK�Z��dL�Z��dM�Z��dN�Z��dO�Z�d�Z�d$�Z�d%�Z�d&�Z�d'�Z��d>�Z��d?�Z��d@�Z��dA�Z��dB�Z��dC�Z��dD�Z��dE�Z��dF�Z��dG�Z��dH�Z��dI�Z��dJ�Z��dK�Z��dL�Z��dM�Z��dN�Z��dO�Z��dP�Z��dQ�Z��dR�Z��dS�Z��dT�Z��dU�Z��dV�Z��dW�Z�d�Z�d$�Z�d%�Z�d'�Z��dE�Z�d$�Z�d�Z�d$�Z�d%�Z�d&�Z�d$�Z�d'�Z��dY�Z��dh�Z��di�Z��d�Z��d�Z��d�Z��d�Z��d�Z�d�Z�d$�Z�d%�Z�d&�Z�d'�Zd>�ZÐd?�ZĐd@�ZŐdA�ZƐdB�ZǐdC�ZȐdD�ZɐdE�ZʐdF�ZːdG�Z̐dH�Z͐dI�ZΐdJ�ZϐdK�ZАdL�ZѐdM�ZҐdN�ZӐdO�ZԐdP�ZՐdQ�Z֐dR�ZאdS�ZؐdT�ZِdU�ZڐdV�ZېdW�ZܐdX�ZݐdY�ZސdZ�Zߐd[�Z�d\�Z�d]�Z�d^�Z�d_�Z�d`�Z�d�Z�d$�Z�d%�Z�d&�Z�d$�Z�d%�Z�d&�Z�d'�Z�d>�Z�d?�Z�d@�Z�dA�Z�dB�Z�dC�Z�d$�Z�d%�Z�d'�Z��dA�Z��d�Z��d��Z��d�Z�d�Z�d$�Z�d%�Z�d&�Z�d'�Z��d>�Z�d?�Z�d@�Zd$�Zd%�Zd&�Zd'�Z�d>�Z�d?�Z�d@�Z	�dA�Z
�dB�Z�dC�Z�dD�Z
�dE�Z�dF�Z�dG�Z�dH�Z�dI�Z�dJ�Z�dK�Z�dL�Z�dM�Z�dN�Z�dO�Z�dP�Z�dQ�Z�dR�Z�dS�Z�dܐZ�dݐZ�dސZ�dߐZ �d�Z!�d�Z"�d�Z#�d�Z$�d�Z%�d�Z&�d�Z'�d�Z(�d��Z)�d��Z*d$�Z+d%�Z,d�Z-d$�Z.d%�Z/d&�Z0d'�Z1�d>�Z2d�Z3d$�Z4d%�Z5d$�Z6d%�Z7d'�Z8�dA�Z9�dI�Z:�dY�Z;�dh�Z<�di�Z=�d�Z>�d��Z?�d�Z@�d�ZA�d�ZB�d�ZC�d�ZD�d �ZE�d�ZF�d!�ZG�d"�ZH�d#�ZI�d$�ZJ�d�ZK�d%�ZLd�ZMd$�ZNd%�ZOd&�ZPd'�ZQd$�ZRd%�ZSd'�ZT�dA�ZU�dI�ZV�dY�ZW�dh�ZX�di�ZYd�ZZd$�Z[d%�Z\d&�Z]d�Z^d$�Z_d%�Z`d&�Zad'�Zb�d>�Zc�d?�Zd�d@�Ze�dA�Zf�dB�Zgd�Zhd$�Zid%�Zjd&�Zkd'�Zl�d>�Zm�d?�Zn�d@�Zo�dA�Zp�dB�Zq�dC�Zr�dD�Zs�dE�Zt�dF�Zu�dG�Zv�dH�Zw�dI�Zx�dJ�Zy�dK�Zz�dL�Z{�dM�Z|�dN�Z}�dO�Z~�dP�Z�dQ�Z��dR�Z�dS((�Nc@seZdZdS)�libxmlErrorN)�__name__�
__module__�__qualname__�rr�/usr/lib64/python3.6/libxml2.pyrsrc	Cs2y"tt�j}|dkr |dkr dSWn
dSdS)NZ	PyCObject�	PyCapsule�r)�type�_objr)�obj�nrrr�checkWrapper	s
rcCst|�}|dkrtj|S|S)Nr)�id�sys�maxsize)�o�irrr�pos_ids
rc@seZdZdd�Zdd�ZdS)�	treeErrorcCs
||_dS)N)�msg)�selfrrrr�__init__sztreeError.__init__cCs|jS)N)r)rrrr�__str__!sztreeError.__str__N)rrrrrrrrrrsrc@seZdZdd�Zdd�ZdS)�parserErrorcCs
||_dS)N)r)rrrrrr%szparserError.__init__cCs|jS)N)r)rrrrr'szparserError.__str__N)rrrrrrrrrr$src@seZdZdd�Zdd�ZdS)�uriErrorcCs
||_dS)N)r)rrrrrr+szuriError.__init__cCs|jS)N)r)rrrrr-szuriError.__str__N)rrrrrrrrrr*src@seZdZdd�Zdd�ZdS)�
xpathErrorcCs
||_dS)N)r)rrrrrr1szxpathError.__init__cCs|jS)N)r)rrrrr3szxpathError.__str__N)rrrrrrrrrr0src@s8eZdZdd�Zdd�Zdd�Zddd	�Zdd
d�ZdS)�	ioWrappercCs||_d|_dS)N)�_ioWrapper__io�_o)rrrrrr7szioWrapper.__init__cCs"|jdkrdS|jj�d|_dS)Nr	r���)r�close)rrrr�io_close;s


zioWrapper.io_closecCs|jdkrdS|jj�dS)Nr	rr )r�flush)rrrr�io_flushBs

zioWrapper.io_flushr	cCs�|jdkrdSy$|dkr$|jj�}n|jj|�}WnLtk
r~ddl}|j�d}tdt|��td|j�|jdkdSX|S)Nr	rzfailed to read from Python:zon IO:r r )r�read�	Exceptionr�exc_info�printr
)r�len�retr�errr�io_readHs

zioWrapper.io_readcCs0|jdkrdS|dkr"|jj|�S|jj||�S)Nr	rr )r�write)r�strr)rrr�io_writeZs

zioWrapper.io_writeNr )r r )r )rrrrr"r$r,r/rrrrr6s

rc@s&eZdZd	dd�Zdd�Zdd�ZdS)
�
ioReadWrapper�cCstj||�tj||�|_dS)N)rr�
libxml2mod�xmlCreateInputBufferr)rr�encrrrrbszioReadWrapper.__init__cCs0td�|j�|jdkr&tj|j�d|_dS)N�__del__)r(r"rr2�xmlFreeParserInputBuffer)rrrrr5fs

zioReadWrapper.__del__cCs(|j�|jdkrtj|j�d|_dS)N)r"rr2r6)rrrrr!ms
zioReadWrapper.closeN)r1)rrrrr5r!rrrrr0as
r0c@s.eZdZddd�Zdd�Zdd�Zdd	�Zd
S)�ioWriteWrapperr1cCs�t|�td�kr td�d|_ntt|�jdkrbtj|�}|dkrNtj||�ntj||�||_n2tj|�}|dkr�tj||�ntj||�||_dS)Nr1zwrite io from a stringr)	r
r(rrr2ZoutputBufferGetPythonFilerrr)rrr4�filerrrrts

zioWriteWrapper.__init__cCs(|j�|jdkrtj|j�d|_dS)N)r"rr2�xmlOutputBufferClose)rrrrr5�s
zioWriteWrapper.__del__cCs(|j�|jdkrtj|j�d|_dS)N)r$rr2r9)rrrrr#�s
zioWriteWrapper.flushcCs(|j�|jdkrtj|j�d|_dS)N)r$rr2r9)rrrrr!�s
zioWriteWrapper.closeN)r1)rrrrr5r#r!rrrrr7ss
r7c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d�Zd#d$�Zd%d&�Zd'd(�Zd)S)*�SAXCallbackzBase class for SAX handlerscCsdS)z#called at the start of the documentNr)rrrr�
startDocument�szSAXCallback.startDocumentcCsdS)z!called at the end of the documentNr)rrrr�endDocument�szSAXCallback.endDocumentcCsdS)z�called at the start of every element, tag is the name of
           the element, attrs is a dictionary of the element's attributesNr)r�tagZattrsrrr�startElement�szSAXCallback.startElementcCsdS)zOcalled at the start of every element, tag is the name of
           the elementNr)rr=rrr�
endElement�szSAXCallback.endElementcCsdS)z�called when character data have been read, data is the string
           containing the data, multiple consecutive characters() callback
           are possible.Nr)r�datarrr�
characters�szSAXCallback.characterscCsdS)z�called when CDATA section have been read, data is the string
           containing the data, multiple consecutive cdataBlock() callback
           are possible.Nr)rr@rrr�
cdataBlock�szSAXCallback.cdataBlockcCsdS)z.called when an entity reference has been foundNr)r�namerrr�	reference�szSAXCallback.referencecCsdS)z>called when potentially ignorable white spaces have been foundNr)rr@rrr�ignorableWhitespace�szSAXCallback.ignorableWhitespacecCsdS)zqcalled when a PI has been found, target contains the PI name and
           data is the associated data in the PINr)r�targetr@rrr�processingInstruction�sz!SAXCallback.processingInstructioncCsdS)zBcalled when a comment has been found, content contains the commentNr)r�contentrrr�comment�szSAXCallback.commentcCsdS)z�called when a DOCTYPE declaration has been found, name is the
           DTD name and externalID, systemID are the DTD public and system
           identifier for that DTd if availableNr)rrC�
externalID�systemIDrrr�externalSubset�szSAXCallback.externalSubsetcCsdS)z�called when a DOCTYPE declaration has been found, name is the
           DTD name and externalID, systemID are the DTD public and system
           identifier for that DTD if availableNr)rrCrJrKrrr�internalSubset�szSAXCallback.internalSubsetcCsdS)acalled when an ENTITY declaration has been found, name is the
           entity name and externalID, systemID are the entity public and
           system identifier for that entity if available, type indicates
           the entity type, and content reports it's string contentNr)rrCr
rJrKrHrrr�
entityDecl�szSAXCallback.entityDeclcCsdS)z�called when an NOTATION declaration has been found, name is the
           notation name and externalID, systemID are the notation public and
           system identifier for that notation if availableNr)rrCrJrKrrr�notationDecl�szSAXCallback.notationDeclcCsdS)z2called when an ATTRIBUTE definition has been foundNr)r�elemrCr
ZdefiZdefaultValueZnameListrrr�
attributeDecl�szSAXCallback.attributeDeclcCsdS)z0called when an ELEMENT definition has been foundNr)rrCr
rHrrr�elementDecl�szSAXCallback.elementDeclcCsdS)acalled when an unparsed ENTITY declaration has been found,
           name is the entity name and publicId,, systemID are the entity
           public and system identifier for that entity if available,
           and notationName indicate the associated NOTATIONNr)rrCZpublicIdrK�notationNamerrrrN�scCsdS)Nr)rrrrr�warning�szSAXCallback.warningcCst|��dS)N)r)rrrrr�error�szSAXCallback.errorcCst|��dS)N)r)rrrrr�
fatalErrorszSAXCallback.fatalErrorN)rrr�__doc__r;r<r>r?rArBrDrErGrIrLrMrNrOrQrRrTrUrVrrrrr:�s*r:c@s�eZdZdCdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZeZdd�Zdd�Zdd�Zd dlZeejd d!��d"kr�d#d$�Zn�eeddd%�Zee	ddd&�Zee
ddd'�Zeeddd(�Zee
ddd)�Zeeddd*�Zeeddd+�Zeeddd,�Zeeddd-�Z eeddd.�Z!dDd/d0�Z"dEd1d2�Z#dFd3d4�Z$dGd5d6�Z%d7d8�Z&d9d:�Z'd;d<�Z(d=d>�Z)d?d@�Z*e)Z+dAdB�Z,dS)H�xmlCoreNcCs|dkr||_dSd|_dS)N)r)rrrrrrszxmlCore.__init__cCs0|dkrdStj|j|j�}|dkr(dS|dkS)NFT)r2�compareNodesEqualr)r�otherr*rrr�__eq__szxmlCore.__eq__cCs"|dkrdStj|j|j�}|S)NT)r2rYr)rrZr*rrr�__ne__szxmlCore.__ne__cCstj|j�}|S)N)r2ZnodeHashr)rr*rrr�__hash__szxmlCore.__hash__cCs|j�S)N)�	serialize)rrrrr"szxmlCore.__str__cCs tj|j�}|dkrdSt|�S)N)r2�parentr�nodeWrap)rr*rrr�
get_parent$szxmlCore.get_parentcCs tj|j�}|dkrdSt|�S)N)r2�childrenrr`)rr*rrr�get_children)szxmlCore.get_childrencCs tj|j�}|dkrdSt|�S)N)r2�lastrr`)rr*rrr�get_last.szxmlCore.get_lastcCs tj|j�}|dkrdSt|�S)N)r2�nextrr`)rr*rrr�get_next3szxmlCore.get_nextcCs"tj|j�}|dkrdSt|d�S)N)r)r2�
propertiesr�xmlAttr)rr*rrr�get_properties8szxmlCore.get_propertiescCs tj|j�}|dkrdSt|�S)N)r2�prevrr`)rr*rrr�get_prev=szxmlCore.get_prevcCstj|j�S)N)r2�xmlNodeGetContentr)rrrr�get_contentBszxmlCore.get_contentcCstj|j�S)N)r2rCr)rrrr�get_nameEszxmlCore.get_namecCstj|j�S)N)r2r
r)rrrr�get_typeGszxmlCore.get_typecCs8tj|j�}|dkr.|jdkr*t|jd�SdSt|d�S)N�document_xml�
document_html)r)rqrr)r2�docrr
�xmlDoc)rr*rrr�get_docIs
zxmlCore.get_docr�g������@cCs�|dkr(tj|j�}|dkr dSt|�S|dkrRtj|j�}|dkrHdSt|d�S|dkrztj|j�}|dkrrdSt|�S|dkr�tj|j�}|dkr�dSt|�S|dkr�tj|j�}|dkr�dSt|�S|dk�r�tj	|j�}|dkr�dSt|�S|dk�r
tj
|j�S|d	k�r tj|j�S|d
k�r6tj|j�S|dk�r�tj
|j�}|dk�r~|jdk�sn|jd
k�rzt|jd�SdSt|d�St|��dS)Nr_rh)rrbrdrfrkrHrCr
rsrqrr)r2r_rr`rhrirbrdrfrkrmrCr
rsrt�AttributeError)r�attrr*rrr�__getattr__WsX







zxmlCore.__getattr__zParent nodezFirst child nodezLast sibling nodezNext sibling nodezPrevious sibling nodezList of properieszContent of this nodez	Node namez	Node typez!The document this node belongs tocCstj|j||�S)N)r2Z
serializeNoder)r�encoding�formatrrrr^�szxmlCore.serializecCstj|j|||�S)N)r2Z
saveNodeTor)rr8rzr{rrr�saveTo�szxmlCore.saveTocCs2|rdd�|D�}tj|j�j||dk||dk�S)NcSsg|]
}|j�qSr)r)�.0r
rrr�
<listcomp>�sz&xmlCore.c14nMemory.<locals>.<listcomp>r)r2ZxmlC14NDocDumpMemoryrur)r�nodes�	exclusive�prefixes�
with_commentsrrr�
c14nMemory�szxmlCore.c14nMemorycCs4|rdd�|D�}tj|j�j||dk||dk|�S)NcSsg|]
}|j�qSr)r)r}r
rrrr~�sz&xmlCore.c14nSaveTo.<locals>.<listcomp>r)r2ZxmlC14NDocSaveTorur)rr8rr�r�r�rrr�
c14nSaveTo�szxmlCore.c14nSaveTocCs:|j}|dkrdS|j�}|j|�|j|�}|j�|S)N)rs�xpathNewContext�setContextNode�	xpathEval�xpathFreeContext)r�exprrs�ctxt�resrrrr��s

zxmlCore.xpathEvalcCs
|j|�S)N)r�)rr�rrr�
xpathEval2�szxmlCore.xpathEval2cCs(tj|j|�}|dkrdSt|d�}|S)a5
        Remove a namespace definition from a node.  If href is None,
        remove all of the ns definitions on that node.  The removed
        namespaces are returned as a linked list.

        Note: If any child nodes referred to the removed namespaces,
        they will be left with dangling links.  You should call
        renconciliateNs() to fix those pointers.

        Note: This method does not free memory taken by the ns
        definitions.  You will need to free it manually with the
        freeNsList() method on the returns xmlNs object.
        N)r)r2ZxmlNodeRemoveNsDefr�xmlNs)r�hrefr*Z
_xmlCore__tmprrr�removeNsDef�s

zxmlCore.removeNsDefcCst|�S)N)�xmlCoreDepthFirstItertor)rrrr�walk_depth_first�szxmlCore.walk_depth_firstcCst|�S)N)�xmlCoreBreadthFirstItertor)rrrr�walk_breadth_firstszxmlCore.walk_breadth_firstc	Cs.y|jjj�WnYnXtj|j�dS)N)rsZ_ctxtr�r2�
xmlFreeDocr)rrrr�frees
zxmlCore.free)N)Nr)Nr)NrNr)NrNr)-rrrrr[r\r]rrarcrergrjrlrn�
getContentrorprur�float�versionry�propertyr_rbrdrfrkrhrHrCr
rsr^r|r�r�r�r�r�r�r��__iter__r�rrrrrXs\

/



rXc@s(eZdZdd�Zdd�Zdd�ZeZdS)r�cCs||_g|_dS)N)�node�parents)rr�rrrrsz!xmlCoreDepthFirstItertor.__init__cCs|S)Nr)rrrrr�sz!xmlCoreDepthFirstItertor.__iter__cCsbx\|jr*|j}|jj|j�|jj|_|Sy|jj�}Wntk
rPt�YnX|j|_qWdS)N)r�r��appendrb�pop�
IndexError�
StopIterationrf)rr*r_rrr�__next__s

z!xmlCoreDepthFirstItertor.__next__N)rrrrr�r�rfrrrrr�sr�c@s(eZdZdd�Zdd�Zdd�ZeZdS)r�cCs||_g|_dS)N)r�r�)rr�rrrr'sz#xmlCoreBreadthFirstItertor.__init__cCs|S)Nr)rrrrr�*sz#xmlCoreBreadthFirstItertor.__iter__cCsbx\|jr*|j}|jj|j�|jj|_|Sy|jj�}Wntk
rPt�YnX|j|_qWdS)N)r�r�r�rfr�r�r�rb)rr*r_rrrr�,s

z#xmlCoreBreadthFirstItertor.__next__N)rrrrr�r�rfrrrrr�&sr�cCs�tj|�}|dks|dkr$t|d�S|dkr6t|d�S|dd�dkrPt|d�S|dkrbt|d�S|d	krtt|d�S|d
kr�t|d�S|dkr�t|d�S|dkr�t	|d�St|d�S)
N�element�text)rZ	attributer�Zdocument�	namespaceZ	elem_declZattribute_declZentity_decl�dtd)
r2r
�xmlNoderirtr��
xmlElement�xmlAttribute�	xmlEntity�xmlDtd)rrCrrrr`=s$








r`cCs|t|�}|tg�kr&ttt|��}|S|tf�krHttt|��}t|�S|td�ksl|td�ksl|td�krp|St|�SdS)Nr1rg)r
�list�map�xpathObjectRet�tupler`)rZotyper*rrrr�Rs$r�cCstj||||�}dS)N)r2�xmlRegisterXPathFunction)r�rC�ns_uri�fr*rrr�registerXPathFunctionbsr�r	�rv�cCs8ddl}d|jkr tj||�}nddl}|j||�}|S)zpRegister a Python written function to for error reporting.
       The function is called back as f(ctx, error). rN�libxslt)r�modulesr2ZxmlRegisterErrorHandlerr��registerErrorHandler)r��ctxrr*r�rrrr�xs
r�c@s6eZdZddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�parserCtxtCoreNcCs|dkr||_dSd|_dS)N)r)rrrrrr�szparserCtxtCore.__init__cCs |jdkrtj|j�d|_dS)N)rr2�xmlFreeParserCtxt)rrrrr5�s
zparserCtxtCore.__del__cCstj|j||�dS)z�Register an error handler that will be called back as
           f(arg,msg,severity,reserved).
           
           @reserved is currently always None.N)r2ZxmlParserCtxtSetErrorHandlerr)rr��argrrr�setErrorHandler�szparserCtxtCore.setErrorHandlercCstj|j�S)zWReturn (f,arg) as previously registered with setErrorHandler
           or (None,None).)r2ZxmlParserCtxtGetErrorHandlerr)rrrr�getErrorHandler�szparserCtxtCore.getErrorHandlercCstj|j|�S)z(Register a local catalog with the parser)r2�addLocalCatalogr)r�urirrrr��szparserCtxtCore.addLocalCatalog)N)rrrrr5r�r�r�rrrrr��s

r�c@seZdZdd�Zddd�ZdS)�
ValidCtxtCorecOsdS)Nr)r�args�kwrrrr�szValidCtxtCore.__init__NcCstj|j|||�dS)zy
        Register error and warning handlers for DTD validation.
        These will be called back as f(msg,arg)
        N)r2ZxmlSetValidErrorsr)r�err_func�	warn_funcr�rrr�setValidityErrorHandler�sz%ValidCtxtCore.setValidityErrorHandler)N)rrrrr�rrrrr��sr�c@seZdZdd�Zddd�ZdS)�SchemaValidCtxtCorecOsdS)Nr)rr�r�rrrr�szSchemaValidCtxtCore.__init__NcCstj|j|||�dS)z|
        Register error and warning handlers for Schema validation.
        These will be called back as f(msg,arg)
        N)r2ZxmlSchemaSetValidErrorsr)rr�r�r�rrrr��sz+SchemaValidCtxtCore.setValidityErrorHandler)N)rrrrr�rrrrr��sr�c@seZdZdd�Zddd�ZdS)�relaxNgValidCtxtCorecOsdS)Nr)rr�r�rrrr�szrelaxNgValidCtxtCore.__init__NcCstj|j|||�dS)z}
        Register error and warning handlers for RelaxNG validation.
        These will be called back as f(msg,arg)
        N)r2ZxmlRelaxNGSetValidErrorsr)rr�r�r�rrrr��sz,relaxNgValidCtxtCore.setValidityErrorHandler)N)rrrrr�rrrrr��sr�cCs|\}}||||t|��S)z)Intermediate callback to wrap the locator)�xmlTextReaderLocator)Zxxx_todo_changemerZseverityZlocatorr�r�rrr�_xmlTextReaderErrorFunc�sr�c@s.eZdZd
dd�Zdd�Zdd�Zdd	�ZdS)�xmlTextReaderCoreNcCs"d|_|dkr||_dSd|_dS)N)�inputr)rrrrrr�s
zxmlTextReaderCore.__init__cCs |jdkrtj|j�d|_dS)N)rr2�xmlFreeTextReader)rrrrr5�s
zxmlTextReaderCore.__del__cCs2|dkrtj|jdd�ntj|jt||f�dS)z]Register an error handler that will be called back as
           f(arg,msg,severity,locator).N)r2ZxmlTextReaderSetErrorHandlerrr�)rr�r�rrr�SetErrorHandler�s
z!xmlTextReaderCore.SetErrorHandlercCs$tj|j�\}}|dkrdS|SdS)zWReturn (f,arg) as previously registered with setErrorHandler
           or (None,None).N)NN)r2ZxmlTextReaderGetErrorHandlerr)rr�r�rrr�GetErrorHandler�sz!xmlTextReaderCore.GetErrorHandler)N)rrrrr5r�r�rrrrr��s

r�cCstj�dS)N)r2�xmlPythonCleanupParserrrrr�
cleanupParser�sr�cCs dd�}tj|�tj|�dS)NcSs*x$tt�D]}||�}|dk	r
|Sq
WdS)N)�reversed�__input_callbacks)�URI�cbrrrr�findOpenCallback�sz/registerInputCallback.<locals>.findOpenCallback)r2ZxmlRegisterInputCallbackr�r�)�funcr�rrr�registerInputCallback�s
r�cCs,tt�dkrtj�tt�dkr(tj�dS)Nr)r)r�r�r2ZxmlUnregisterInputCallbackrrrr�popInputCallbackssr�cCs&tj||�}|dkrtd��t|d�S)z8Create a parser context for an HTML in-memory document. Nz#htmlCreateMemoryParserCtxt() failed)r)r2�htmlCreateMemoryParserCtxtr�
parserCtxt)�buffer�sizer*rrrr�sr�cCstj|�}|S)zISet and return the previous value for handling HTML omitted
       tags. )r2�htmlHandleOmittedElem)�valr*rrrr�s
r�cCstj|�}|S)z0Check if an attribute is of content type Script )r2�htmlIsScriptAttribute)rCr*rrrr�%s
r�cCs"tj�}|dkrtd��t|d�S)z.Allocate and initialize a new parser context. NzhtmlNewParserCtxt() failed)r)r2�htmlNewParserCtxtrr�)r*rrrr�*sr�cCs&tj||�}|dkrtd��t|d�S)z3parse an HTML in-memory document and build a tree. NzhtmlParseDoc() failed)r)r2�htmlParseDocrrt)�currzr*rrrr�0sr�cCs&tj||�}|dkrtd��t|d�S)z�parse an HTML file and build a tree. Automatic support for
      ZLIB/Compress compressed document is provided by default if
       found at compile-time. NzhtmlParseFile() failed)r)r2�
htmlParseFilerrt)�filenamerzr*rrrr�6sr�cCs*tj||||�}|dkr td��t|d�S)z2parse an XML in-memory document and build a tree. NzhtmlReadDoc() failed)r)r2�htmlReadDocrrt)r��URLrz�optionsr*rrrr�>sr�cCs*tj||||�}|dkr td��t|d�S)z6parse an XML from a file descriptor and build a tree. NzhtmlReadFd() failed)r)r2�
htmlReadFdrrt)�fdr�rzr�r*rrrr�Dsr�cCs(tj|||�}|dkrtd��t|d�S)z6parse an XML file from the filesystem or the network. NzhtmlReadFile() failed)r)r2�htmlReadFilerrt)r�rzr�r*rrrr�Jsr�cCs,tj|||||�}|dkr"td��t|d�S)z2parse an XML in-memory document and build a tree. NzhtmlReadMemory() failed)r)r2�htmlReadMemoryrrt)r�r�r�rzr�r*rrrr�Psr�cCstj|�}|S)z7Determine if a given attribute is a boolean attribute. )r2�htmlIsBooleanAttr)rCr*rrrr�Zs
r�cCs&tj||�}|dkrtd��t|d�S)zCreates a new HTML document NzhtmlNewDoc() failed)r)r2�
htmlNewDocrrt)r��
ExternalIDr*rrrr�_sr�cCs&tj||�}|dkrtd��t|d�S)zWCreates a new HTML document without a DTD node if @URI and
       @ExternalID are None NzhtmlNewDocNoDtD() failed)r)r2�htmlNewDocNoDtDrrt)r�r�r*rrrr�esr�cCstj|�}|S)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. )r2ZxmlSAXDefaultVersion)r�r*rrr�SAXDefaultVersionps
r�cCstj�dS)z$Initialize the default SAX2 handler N)r2ZxmlDefaultSAXHandlerInitrrrr�defaultSAXHandlerInitysr�cCstj�dS)z#Initialize the default SAX handler N)r2�docbDefaultSAXHandlerInitrrrrr�}sr�cCstj�dS)z#Initialize the default SAX handler N)r2�htmlDefaultSAXHandlerInitrrrrr��sr�cCstj|||�}|S)z�Add an entry in the catalog, it may overwrite existing but
      different entries. If called before any other catalog
      routine, allows to override the default shared catalog put
       in place by xmlInitializeCatalog(); )r2Z
xmlCatalogAdd)r
�orig�replacer*rrr�
catalogAdd�sr�cCstj�dS)z0Free up all the memory associated with catalogs N)r2ZxmlCatalogCleanuprrrr�catalogCleanup�sr�cCstj�}|S)z1Convert all the SGML catalog entries as XML ones )r2ZxmlCatalogConvert)r*rrr�catalogConvert�sr�cCs|dk	r|j�tj|�dS)z7Dump all the global catalog content to the given file. N)r#r2ZxmlCatalogDump)�outrrr�catalogDump�sr�cCstj|�}|S)zoTry to lookup the catalog reference associated to a public
       ID DEPRECATED, use xmlCatalogResolvePublic() )r2ZxmlCatalogGetPublic)�pubIDr*rrr�catalogGetPublic�s
r�cCstj|�}|S)zoTry to lookup the catalog reference associated to a system
       ID DEPRECATED, use xmlCatalogResolveSystem() )r2ZxmlCatalogGetSystem)�sysIDr*rrr�catalogGetSystem�s
r�cCstj|�}|S)z!Remove an entry from the catalog )r2ZxmlCatalogRemove)�valuer*rrr�
catalogRemove�s
rcCstj||�}|S)z:Do a complete resolution lookup of an External Identifier )r2ZxmlCatalogResolve)r�r�r*rrr�catalogResolve�srcCstj|�}|S)zETry to lookup the catalog reference associated to a public
       ID )r2ZxmlCatalogResolvePublic)r�r*rrr�catalogResolvePublic�s
rcCstj|�}|S)z3Try to lookup the catalog resource for a system ID )r2ZxmlCatalogResolveSystem)r�r*rrr�catalogResolveSystem�s
rcCstj|�}|S)z*Do a complete resolution lookup of an URI )r2ZxmlCatalogResolveURI)r�r*rrr�catalogResolveURI�s
rcCstj|�}|S)z[Used to set the debug level for catalog operation, 0
       disable debugging, 1 enable it )r2ZxmlCatalogSetDebug)�levelr*rrr�catalogSetDebug�s
rcCstj�dS)z�Do the catalog initialization. this function is not thread
      safe, catalog initialization should preferably be done once
       at startup N)r2ZxmlInitializeCatalogrrrr�initializeCatalog�srcCs$tj|�}|dkrtd��t|d�S)z�Load the catalog and build the associated data structures.
      This can be either an XML Catalog or an SGML Catalog It
      will recurse in SGML CATALOG entries. On the other hand XML
       Catalogs are not handled recursively. NzxmlLoadACatalog() failed)r)r2ZxmlLoadACatalogr�catalog)r�r*rrr�loadACatalog�s
r
cCstj|�}|S)z�Load the catalog and makes its definitions effective for
      the default external entity loader. It will recurse in SGML
      CATALOG entries. this function is not thread safe, catalog
       initialization should preferably be done once at startup )r2ZxmlLoadCatalog)r�r*rrr�loadCatalog�s
rcCstj|�dS)z�Load the catalogs and makes their definitions effective for
      the default external entity loader. this function is not
      thread safe, catalog initialization should preferably be
       done once at startup N)r2ZxmlLoadCatalogs)Zpathssrrr�loadCatalogs�srcCs$tj|�}|dkrtd��t|d�S)z�Load an SGML super catalog. It won't expand CATALOG or
      DELEGATE references. This is only needed for manipulating
      SGML Super Catalogs like adding and removing CATALOG or
       DELEGATE entries. Nz xmlLoadSGMLSuperCatalog() failed)r)r2ZxmlLoadSGMLSuperCatalogrr	)r�r*rrr�loadSGMLSuperCatalog�s
r
cCs$tj|�}|dkrtd��t|d�S)zcreate a new Catalog. NzxmlNewCatalog() failed)r)r2Z
xmlNewCatalogrr	)Zsgmlr*rrr�
newCatalog�s
rcCs$tj|�}|dkrtd��t|d�S)zjparse an XML file and build a tree. It's like
       xmlParseFile() except it bypass all catalog lookups. NzxmlParseCatalogFile() failed)r)r2ZxmlParseCatalogFilerrt)r�r*rrr�parseCatalogFile�s
rcCstj|�}|S)zSThis function is DEPRECATED. Use xmlIsBaseChar_ch or
       xmlIsBaseCharQ instead )r2Z
xmlIsBaseChar)�chr*rrr�
isBaseChars
rcCstj|�}|S)zMThis function is DEPRECATED. Use xmlIsBlank_ch or
       xmlIsBlankQ instead )r2Z
xmlIsBlank)rr*rrr�isBlank	s
rcCstj|�}|S)zKThis function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ
       instead )r2Z	xmlIsChar)rr*rrr�isChars
rcCstj|�}|S)z9This function is DEPRECATED. Use xmlIsCombiningQ instead )r2ZxmlIsCombining)rr*rrr�isCombinings
rcCstj|�}|S)zMThis function is DEPRECATED. Use xmlIsDigit_ch or
       xmlIsDigitQ instead )r2Z
xmlIsDigit)rr*rrr�isDigits
rcCstj|�}|S)zSThis function is DEPRECATED. Use xmlIsExtender_ch or
       xmlIsExtenderQ instead )r2Z
xmlIsExtender)rr*rrr�
isExtender s
rcCstj|�}|S)z;This function is DEPRECATED. Use xmlIsIdeographicQ instead )r2ZxmlIsIdeographic)rr*rrr�
isIdeographic&s
rcCstj|�}|S)zUThis function is DEPRECATED. Use xmlIsPubidChar_ch or
       xmlIsPubidCharQ instead )r2ZxmlIsPubidChar)rr*rrr�isPubidChar+s
rcCstj|�}|S)z&Convenient way to turn bool into text )r2Z
xmlBoolToText)Zboolvalr*rrr�
boolToText5s
rcCs |dk	r|j�tj||�dS)z=Dumps informations about the string, shorten it if necessary N)r#r2ZxmlDebugDumpString)�outputr.rrr�debugDumpString:srcCstj||�dS)z6Print the xpath error to libxml default error channel N)r2ZxmlShellPrintXPathError)Z	errorTyper�rrr�shellPrintXPathError?srcCstj�dS)z^Free the dictionary mutex. Do not call unless sure the
       library is not in use anymore ! N)r2ZxmlDictCleanuprrrr�dictCleanupGsrcCstj�}|S)zKDo the dictionary mutex initialization. this function is
       deprecated )r2ZxmlInitializeDict)r*rrr�initializeDictLsrcCstj||�}|S)zbRegisters an alias @alias for an encoding named @name.
       Existing alias will be overwritten. )r2ZxmlAddEncodingAlias)rC�aliasr*rrr�addEncodingAliasVsr cCstj�dS)z}Cleanup the memory allocated for the char encoding support,
       it unregisters all the encoding handlers and the aliases. N)r2ZxmlCleanupCharEncodingHandlersrrrr�cleanupCharEncodingHandlers\sr!cCstj�dS)zUnregisters all aliases N)r2ZxmlCleanupEncodingAliasesrrrr�cleanupEncodingAliasesasr"cCstj|�}|S)z%Unregisters an encoding alias @alias )r2ZxmlDelEncodingAlias)rr*rrr�delEncodingAliases
r#cCstj|�}|S)z-Lookup an encoding name for the given alias. )r2ZxmlGetEncodingAlias)rr*rrr�
encodingAliasjs
r$cCstj�dS)z�Initialize 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)r2ZxmlInitCharEncodingHandlersrrrr�initCharEncodingHandlersosr%cCstj�dS)z:Cleanup up the predefined entities table. Deprecated call N)r2ZxmlCleanupPredefinedEntitiesrrrr�cleanupPredefinedEntitieszsr&cCstj�dS)z0Set up the predefined entities. Deprecated call N)r2ZxmlInitializePredefinedEntitiesrrrr�initializePredefinedEntities~sr'cCs$tj|�}|dkrtd��t|d�S)z1Check whether this name is an predefined entity. NzxmlGetPredefinedEntity() failed)r)r2ZxmlGetPredefinedEntityrr�)rCr*rrr�predefinedEntity�s
r(cCstj�dS)z'Additional cleanup for multi-threading N)r2ZxmlCleanupGlobalsrrrr�cleanupGlobals�sr)cCstj�dS)z.Additional initialisation for multi-threading N)r2ZxmlInitGlobalsrrrr�initGlobals�sr*cCstj|�}|S)N)r2ZxmlThrDefDefaultBufferSize)�vr*rrr�thrDefDefaultBufferSize�s
r,cCstj|�}|S)N)r2Z'xmlThrDefDoValidityCheckingDefaultValue)r+r*rrr�$thrDefDoValidityCheckingDefaultValue�s
r-cCstj|�}|S)N)r2Z xmlThrDefGetWarningsDefaultValue)r+r*rrr�thrDefGetWarningsDefaultValue�s
r.cCstj|�}|S)N)r2ZxmlThrDefIndentTreeOutput)r+r*rrr�thrDefIndentTreeOutput�s
r/cCstj|�}|S)N)r2ZxmlThrDefKeepBlanksDefaultValue)r+r*rrr�thrDefKeepBlanksDefaultValue�s
r0cCstj|�}|S)N)r2Z xmlThrDefLineNumbersDefaultValue)r+r*rrr�thrDefLineNumbersDefaultValue�s
r1cCstj|�}|S)N)r2ZxmlThrDefLoadExtDtdDefaultValue)r+r*rrr�thrDefLoadExtDtdDefaultValue�s
r2cCstj|�}|S)N)r2ZxmlThrDefParserDebugEntities)r+r*rrr�thrDefParserDebugEntities�s
r3cCstj|�}|S)N)r2Z#xmlThrDefPedanticParserDefaultValue)r+r*rrr� thrDefPedanticParserDefaultValue�s
r4cCstj|�}|S)N)r2ZxmlThrDefSaveNoEmptyTags)r+r*rrr�thrDefSaveNoEmptyTags�s
r5cCstj|�}|S)N)r2Z'xmlThrDefSubstituteEntitiesDefaultValue)r+r*rrr�$thrDefSubstituteEntitiesDefaultValue�s
r6cCstj|�}|S)N)r2ZxmlThrDefTreeIndentString)r+r*rrr�thrDefTreeIndentString�s
r7cCstj�dS)zHCleanup the FTP protocol layer. This cleanup proxy
       informations. N)r2ZxmlNanoFTPCleanuprrrr�nanoFTPCleanup�sr8cCstj�dS)zpInitialize the FTP protocol layer. Currently it just checks
       for proxy informations, and get the hostname N)r2ZxmlNanoFTPInitrrrr�nanoFTPInit�sr9cCstj|||||�dS)z�Setup the FTP proxy informations. This can also be done by
      using ftp_proxy ftp_proxy_user and ftp_proxy_password
       environment variables. N)r2ZxmlNanoFTPProxy)�host�port�userZpasswdr
rrr�nanoFTPProxy�sr=cCstj|�dS)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 informations. N)r2ZxmlNanoFTPScanProxy)r�rrr�nanoFTPScanProxy�sr>cCstj�dS)z!Cleanup the HTTP protocol layer. N)r2ZxmlNanoHTTPCleanuprrrr�nanoHTTPCleanup�sr?cCstj�dS)z[Initialize the HTTP protocol layer. Currently it just
       checks for proxy informations N)r2ZxmlNanoHTTPInitrrrr�nanoHTTPInit�sr@cCstj|�dS)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 informations. N)r2ZxmlNanoHTTPScanProxy)r�rrr�nanoHTTPScanProxy�srAcCs$tj|�}|dkrtd��t|d�S)z8Creates a parser context for an XML in-memory document. NzxmlCreateDocParserCtxt() failed)r)r2ZxmlCreateDocParserCtxtrr�)r�r*rrr�createDocParserCtxt�s
rBcCstj�dS)z�Initialization function for the XML parser. This is not
      reentrant. Call once before processing in case of use in
       multithreaded programs. N)r2Z
xmlInitParserrrrr�
initParser�srCcCstj|�}|S)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. )r2ZxmlKeepBlanksDefault)r�r*rrr�keepBlanksDefaults
rDcCstj|�}|S)z�Set and return the previous value for enabling line numbers
      in elements contents. This may break on old application and
       is turned off by default. )r2ZxmlLineNumbersDefault)r�r*rrr�lineNumbersDefaults
rEcCs"tj�}|dkrtd��t|d�S)z.Allocate and initialize a new parser context. NzxmlNewParserCtxt() failed)r)r2ZxmlNewParserCtxtrr�)r*rrr�
newParserCtxt srFcCs&tj||�}|dkrtd��t|d�S)z#Load and parse an external subset. NzxmlParseDTD() failed)r)r2ZxmlParseDTDrr�)r��SystemIDr*rrr�parseDTD&srHcCs$tj|�}|dkrtd��t|d�S)z2parse an XML in-memory document and build a tree. NzxmlParseDoc() failed)r)r2ZxmlParseDocrrt)r�r*rrr�parseDoc,s
rIcCs$tj|�}|dkrtd��t|d�S)z�parse an XML external entity out of context and build a
      tree.  [78] extParsedEnt ::= TextDecl? content  This
       correspond to a "Well Balanced" chunk NzxmlParseEntity() failed)r)r2ZxmlParseEntityrrt)r�r*rrr�parseEntity2s
rJcCs$tj|�}|dkrtd��t|d�S)z�parse an XML file and build a tree. Automatic support for
      ZLIB/Compress compressed document is provided by default if
       found at compile-time. NzxmlParseFile() failed)r)r2ZxmlParseFilerrt)r�r*rrr�	parseFile:s
rKcCs&tj||�}|dkrtd��t|d�S)z/parse an XML in-memory block and build a tree. NzxmlParseMemory() failed)r)r2ZxmlParseMemoryrrt)r�r�r*rrr�parseMemoryBsrLcCstj|�}|S)zISet and return the previous value for enabling pedantic
       warnings. )r2ZxmlPedanticParserDefault)r�r*rrr�pedanticParserDefaultHs
rMcCs*tj||||�}|dkr td��t|d�S)z2parse an XML in-memory document and build a tree. NzxmlReadDoc() failed)r)r2Z
xmlReadDocrrt)r�r�rzr�r*rrr�readDocNsrNcCs*tj||||�}|dkr td��t|d�S)z�parse an XML from a file descriptor and build a tree. NOTE
      that the file descriptor will not be closed when the reader
       is closed or reset. NzxmlReadFd() failed)r)r2Z	xmlReadFdrrt)r�r�rzr�r*rrr�readFdTsrOcCs(tj|||�}|dkrtd��t|d�S)z6parse an XML file from the filesystem or the network. NzxmlReadFile() failed)r)r2ZxmlReadFilerrt)r�rzr�r*rrr�readFile\srPcCs,tj|||||�}|dkr"td��t|d�S)z2parse an XML in-memory document and build a tree. NzxmlReadMemory() failed)r)r2Z
xmlReadMemoryrrt)r�r�r�rzr�r*rrr�
readMemorybsrQcCs$tj|�}|dkrtd��t|d�S)z�parse an XML in-memory document and build a tree. In the
      case the document is not Well Formed, a attempt to build a
       tree is tried anyway NzxmlRecoverDoc() failed)r)r2Z
xmlRecoverDocrrt)r�r*rrr�
recoverDochs
rRcCs$tj|�}|dkrtd��t|d�S)z�parse an XML file and build a tree. Automatic support for
      ZLIB/Compress compressed document is provided by default if
      found at compile-time. In the case the document is not Well
       Formed, it attempts to build a tree anyway NzxmlRecoverFile() failed)r)r2ZxmlRecoverFilerrt)r�r*rrr�recoverFileps
rScCs&tj||�}|dkrtd��t|d�S)z�parse an XML in-memory block and build a tree. In the case
      the document is not Well Formed, an attempt to build a tree
       is tried anyway NzxmlRecoverMemory() failed)r)r2ZxmlRecoverMemoryrrt)r�r�r*rrr�
recoverMemoryysrTcCstj|�}|S)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. )r2ZxmlSubstituteEntitiesDefault)r�r*rrr�substituteEntitiesDefault�s
rUcCstj|�}|S)a0Checks 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 sucessors of RFC 1766, currently
      5646  http://www.rfc-editor.org/rfc/rfc5646.txt langtag    
      = language ["-" script] ["-" region] *("-" variant) *("-"
      extension) ["-" privateuse] language      = 2*3ALPHA       
      ; shortest ISO 639 code ["-" extlang]       ; sometimes
      followed by ; extended language subtags / 4ALPHA           
      ; or reserved for future use / 5*8ALPHA            ; or
      registered language subtag  extlang       = 3ALPHA         
      ; selected ISO 639 codes *2("-" 3ALPHA)      ; permanently
      reserved  script        = 4ALPHA              ; ISO 15924
      code  region        = 2ALPHA              ; ISO 3166-1 code
      / 3DIGIT              ; UN M.49 code  variant       =
      5*8alphanum         ; registered variants / (DIGIT
      3alphanum)  extension     = singleton 1*("-" (2*8alphanum))
      ; Single alphanumerics ; "x" reserved for private use
      singleton     = DIGIT               ; 0 - 9 / %x41-57      
      ; A - W / %x59-5A             ; Y - Z / %x61-77            
      ; a - w / %x79-7A             ; y - z  it sounds right to
      still allow Irregular i-xxx IANA and user codes too The
      parser below doesn't try to cope with extension or
      privateuse that could be added but that's not interoperable
       anyway )r2ZxmlCheckLanguageID)�langr*rrr�checkLanguageID�s
rWcCstj|||�}|S)z#append the char value in the array )r2ZxmlCopyChar)r)r�r�r*rrr�copyChar�srXcCstj||�}|S)z#append the char value in the array )r2ZxmlCopyCharMultiByte)r�r�r*rrr�copyCharMultiByte�srYcCs(tj|||�}|dkrtd��t|d�S)z�Create a parser context for an external entity Automatic
      support for ZLIB/Compress compressed document is provided
       by default if found at compile-time. Nz"xmlCreateEntityParserCtxt() failed)r)r2ZxmlCreateEntityParserCtxtrr�)r��ID�baser*rrr�createEntityParserCtxt�sr\cCs$tj|�}|dkrtd��t|d�S)z�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() failed)r)r2ZxmlCreateFileParserCtxtrr�)r�r*rrr�createFileParserCtxt�s
r]cCs&tj||�}|dkrtd��t|d�S)z7Create a parser context for an XML in-memory document. Nz"xmlCreateMemoryParserCtxt() failed)r)r2ZxmlCreateMemoryParserCtxtrr�)r�r�r*rrr�createMemoryParserCtxt�sr^cCs&tj||�}|dkrtd��t|d�S)z�Create a parser context for a file or URL content.
      Automatic support for ZLIB/Compress compressed document is
      provided by default if found at compile-time and for file
       accesses NzxmlCreateURLParserCtxt() failed)r)r2ZxmlCreateURLParserCtxtrr�)r�r�r*rrr�createURLParserCtxt�sr_cCs&tj||�}|dkrtd��t|d�S)z�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!htmlCreateFileParserCtxt() failed)r)r2�htmlCreateFileParserCtxtrr�)r�rzr*rrrr`�sr`cCstj�dS)z�Initialize the htmlStartCloseIndex for fast lookup of
      closing tags names. This is not reentrant. Call
      xmlInitParser() once before processing in case of use in
       multithreaded programs. N)r2�htmlInitAutoCloserrrrra�sracCstj|�}|S)zgCheck whether the character is allowed by the production
       [84] Letter ::= BaseChar | Ideographic )r2ZxmlIsLetter)�cr*rrr�isLetter�s
rccCs"|dkrd}n|j}tj|�}|S)z.Pops the top element name from the name stack N)rr2�namePop)r��ctxt__or*rrrrd�s

rdcCs$|dkrd}n|j}tj||�}|S)z3Pushes a new element name on top of the name stack N)rr2�namePush)r�rrer*rrrrf�s
rfcCs8|dkrd}n|j}tj|�}|dkr.td��t|d�S)z.Pops the top element node from the node stack NznodePop() failed)r)rr2�nodePoprr�)r�rer*rrrrg�s
rgcCs8|dkrd}n|j}|dkr"d}n|j}tj||�}|S)z3Pushes a new element node on top of the node stack N)rr2�nodePush)r�rreZvalue__or*rrrrhsrhcCstj|||�dS)zmInterface to parse an XML file or resource pointed by an
       URI to build an event flow to the SAX object N)r2ZxmlSAXParseFile)�SAXr�Zrecoverrrr�SAXParseFilesrjcCs&tj||�}|dkrtd��t|d�S)z1Create a libxml2 input buffer from a Python file NzxmlCreateInputBuffer() failed)r)r2r3r�inputBuffer)r8rzr*rrr�createInputBuffersrlcCs&tj||�}|dkrtd��t|d�S)z2Create a libxml2 output buffer from a Python file NzxmlCreateOutputBuffer() failed)r)r2ZxmlCreateOutputBufferr�outputBuffer)r8rzr*rrr�createOutputBuffersrncCs*tj||||�}|dkr td��t|d�S)z�Create a progressive XML parser context to build either an
      event flow if the SAX object is not None, or a DOM tree
       otherwise. NzxmlCreatePushParser() failed)r)r2ZxmlCreatePushParserrr�)ri�chunkr�r�r*rrr�createPushParser#srpcCstj|�}|S)z�Switch on the generation of line number for elements nodes.
      Also returns the number of bytes allocated and not freed by
       libxml2 since memory debugging was switched on. )r2ZxmlDebugMemory)Zactivater*rrr�debugMemory+s
rqcCstj�dS)z/dump the memory allocated in the file .memdump N)r2Z
xmlDumpMemoryrrrr�
dumpMemory2srrcCs*tj||||�}|dkr td��t|d�S)z�Create a progressive HTML parser context to build either an
      event flow if the SAX object is not None, or a DOM tree
       otherwise. NzhtmlCreatePushParser() failed)r)r2�htmlCreatePushParserrr�)riror�r�r*rrrrs6srscCstj|||�dS)znInterface to parse an HTML file or resource pointed by an
       URI to build an event flow to the SAX object N)r2�htmlSAXParseFile)rir�rzrrrrt>srtcCstj�}|S)z8Returns the total amount of memory allocated by libxml2 )r2Z
xmlMemoryUsed)r*rrr�
memoryUsedCsrucCs$tj|�}|dkrtd��t|d�S)zCreate a new Node NzxmlNewNode() failed)r)r2Z
xmlNewNoderr�)rCr*rrr�newNodeHs
rvcCstj�dS)a�Cleanup function for the XML library. It tries to reclaim
      all parsing related global memory allocated for the library
      processing. It doesn't deallocate any document related
      memory. Calling this function should not prevent reusing
      the library but one should call xmlCleanupParser() only
      when the process has finished using the library or XML
       document built with it. N)r2r�rrrr�pythonCleanupParserNsrwcCstj|�}|S)z-Set the entity resolver as a python function )r2ZxmlSetEntityLoader)Zresolverr*rrr�setEntityLoaderXs
rxcCstj�dS)zFCleanup the default Schemas type library associated to
       RelaxNG N)r2ZxmlRelaxNGCleanupTypesrrrr�relaxNGCleanupTypesasrycCstj�}|S)z&Initilize the default type libraries. )r2ZxmlRelaxNGInitTypes)r*rrr�relaxNGInitTypesfsrzcCs&tj||�}|dkrtd��t|d�S)zmCreate an XML RelaxNGs parse context for that memory buffer
       expected to contain an XML RelaxNGs file. Nz#xmlRelaxNGNewMemParserCtxt() failed)r)r2ZxmlRelaxNGNewMemParserCtxtr�relaxNgParserCtxt)r�r�r*rrr�relaxNGNewMemParserCtxtksr|cCs$tj|�}|dkrtd��t|d�S)zmCreate an XML RelaxNGs parse context for that file/resource
       expected to contain an XML RelaxNGs file. Nz xmlRelaxNGNewParserCtxt() failed)r)r2ZxmlRelaxNGNewParserCtxtrr{)r�r*rrr�relaxNGNewParserCtxtrs
r}cCstj||||�}|S)z�Builds the QName @prefix:@ncname in @memory if there is
      enough space and prefix is not None nor empty, otherwise
      allocate a new string. If prefix is None or empty it
       returns ncname. )r2Z
xmlBuildQName)Zncname�prefixZmemoryr)r*rrr�
buildQName}srcCstj�}|S)z3get the default compression mode used, ZLIB based. )r2ZxmlGetCompressMode)r*rrr�compressMode�sr�cCstj||�}|S)z7Try to find if the document correspond to an XHTML DTD )r2Z
xmlIsXHTML)rKZpublicIDr*rrr�isXHTML�sr�cCs$tj|�}|dkrtd��t|d�S)z-Creation of a new node containing a comment. NzxmlNewComment() failed)r)r2Z
xmlNewCommentrr�)rHr*rrr�
newComment�s
r�cCs$tj|�}|dkrtd��t|d�S)zCreates a new XML document NzxmlNewDoc() failed)r)r2Z	xmlNewDocrrt)r�r*rrr�newDoc�s
r�cCs&tj||�}|dkrtd��t|d�S)zhCreation of a processing instruction element. Use
       xmlDocNewPI preferably to get string interning NzxmlNewPI() failed)r)r2ZxmlNewPIrr�)rCrHr*rrr�newPI�sr�cCs$tj|�}|dkrtd��t|d�S)zCreation of a new text node. NzxmlNewText() failed)r)r2Z
xmlNewTextrr�)rHr*rrr�newText�s
r�cCs&tj||�}|dkrtd��t|d�S)zTCreation of a new text node with an extra parameter for the
       content's length NzxmlNewTextLen() failed)r)r2Z
xmlNewTextLenrr�)rHr)r*rrr�
newTextLen�sr�cCstj|�dS)zqset the default compression mode used, ZLIB based Correct
       values: 0 (uncompressed) to 9 (max compression) N)r2ZxmlSetCompressMode)�moderrr�setCompressMode�sr�cCstj||�}|S)z;Check that a value conforms to the lexical space of NCName )r2ZxmlValidateNCName)r�spacer*rrr�validateNCName�sr�cCstj||�}|S)z<Check that a value conforms to the lexical space of NMToken )r2ZxmlValidateNMToken)rr�r*rrr�validateNMToken�sr�cCstj||�}|S)z9Check that a value conforms to the lexical space of Name )r2ZxmlValidateName)rr�r*rrr�validateName�sr�cCstj||�}|S)z:Check that a value conforms to the lexical space of QName )r2ZxmlValidateQName)rr�r*rrr�
validateQName�sr�cCstj|�}|S)z�Escaping routine, does not do validity checks ! It will try
      to escape the chars needing this, but this is heuristic
       based it's impossible to be sure. )r2ZxmlURIEscape)r.r*rrr�	URIEscape�s
r�cCstj||�}|S)zzThis routine escapes a string to hex, ignoring reserved
       characters (a-z) and the characters in the exception list. )r2ZxmlURIEscapeStr)r.r�r*rrr�URIEscapeStr�sr�cCstj|||�}|S)z�Unescaping 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. )r2ZxmlURIUnescapeString)r.r)rFr*rrr�URIUnescapeString�sr�cCstj||�}|S)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 wierd 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. )r2ZxmlBuildRelativeURI)r�r[r*rrr�buildRelativeURI�sr�cCstj||�}|S)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 )r2ZxmlBuildURI)r�r[r*rrr�buildURI�sr�cCstj|�}|S)z3Constructs a canonic path from the specified path. )r2ZxmlCanonicPath)�pathr*rrr�canonicPaths
r�cCs"tj�}|dkrtd��t|d�S)zSimply creates an empty xmlURI NzxmlCreateURI() failed)r)r2ZxmlCreateURIrr�)r*rrr�	createURIsr�cCstj|�}|S)z�Applies 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 )r2ZxmlNormalizeURIPath)r�r*rrr�normalizeURIPaths
r�cCs$tj|�}|dkrtd��t|d�S)zfParse an URI based on RFC 3986  URI-reference = [
       absoluteURI | relativeURI ] [ "#" fragment ] NzxmlParseURI() failed)r)r2ZxmlParseURIrr�)r.r*rrr�parseURIs
r�cCs&tj||�}|dkrtd��t|d�S)zjParse an URI but allows to keep intact the original
       fragments.  URI-reference = URI / relative-ref NzxmlParseURIRaw() failed)r)r2ZxmlParseURIRawrr�)r.�rawr*rrr�parseURIRawsr�cCstj|�}|S)z/Constructs an URI expressing the existing path )r2ZxmlPathToURI)r�r*rrr�	pathToURI!s
r�cCs"tj�}|dkrtd��t|d�S)z)Allocate a validation context structure. NzxmlNewValidCtxt() failed)r)r2ZxmlNewValidCtxtr�	ValidCtxt)r*rrr�newValidCtxt*sr�cCstj|�}|S)z4Validate that the given value match Name production )r2ZxmlValidateNameValue)rr*rrr�validateNameValue0s
r�cCstj|�}|S)z5Validate that the given value match Names production )r2ZxmlValidateNamesValue)rr*rrr�validateNamesValue5s
r�cCstj|�}|S)zRValidate that the given value match Nmtoken production  [
       VC: Name Token ] )r2ZxmlValidateNmtokenValue)rr*rrr�validateNmtokenValue:s
r�cCstj|�}|S)zSValidate that the given value match Nmtokens production  [
       VC: Name Token ] )r2ZxmlValidateNmtokensValue)rr*rrr�validateNmtokensValue@s
r�cCstj|�}|S)z�function checks to see if @path is a valid source (file,
      socket...) for XML.  if stat is not available on the target
       machine, )r2ZxmlCheckFilename)r�r*rrr�
checkFilenameJs
r�cCstj�dS)zRclears the entire input callback table. this includes the
       compiled-in I/O. N)r2ZxmlCleanupInputCallbacksrrrr�cleanupInputCallbacksQsr�cCstj�dS)z]clears the entire output callback table. this includes the
       compiled-in I/O callbacks. N)r2ZxmlCleanupOutputCallbacksrrrr�cleanupOutputCallbacksVsr�cCstj|�}|S)zinput from FILE * )r2ZxmlFileMatch)r�r*rrr�	fileMatch[s
r�cCstj|�}|S)z$check if the URI matches an FTP one )r2Z
xmlIOFTPMatch)r�r*rrr�
iOFTPMatch`s
r�cCstj|�}|S)z%check if the URI matches an HTTP one )r2ZxmlIOHTTPMatch)r�r*rrr�iOHTTPMatches
r�cCstj|�}|S)z\This function is obsolete. Please see xmlURIFromPath in
       uri.c for a better solution. )r2ZxmlNormalizeWindowsPath)r�r*rrr�normalizeWindowsPathjs
r�cCstj|�}|S)z#lookup the directory for that file )r2ZxmlParserGetDirectory)r�r*rrr�parserGetDirectoryps
r�cCstj�dS)z0Registers the default compiled-in I/O handlers. N)r2Z xmlRegisterDefaultInputCallbacksrrrr�registerDefaultInputCallbacksusr�cCstj�dS)z0Registers the default compiled-in I/O handlers. N)r2Z!xmlRegisterDefaultOutputCallbacksrrrr�registerDefaultOutputCallbacksysr�cCstj�dS)z�By 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)r2ZxmlRegisterHTTPPostCallbacksrrrr�registerHTTPPostCallbacks}sr�cCs"tj�}|dkrtd��t|d�S)zaGet the last global error registered. This is per thread if
       compiled with thread support. NzxmlGetLastError() failed)r)r2ZxmlGetLastErrorr�Error)r*rrr�	lastError�sr�cCstj�dS)ztCleanup the last global error registered. For parsing error
       this does not change the well-formedness result. N)r2ZxmlResetLastErrorrrrr�resetLastError�sr�cCs$tj|�}|dkrtd��t|d�S)zGCreate an xmlTextReader structure fed with the resource at
       @URI Nz!xmlNewTextReaderFilename() failed)r)r2ZxmlNewTextReaderFilenamer�
xmlTextReader)r�r*rrr�newTextReaderFilename�s
r�cCs*tj||||�}|dkr td��t|d�S)z~Create an xmltextReader for an XML in-memory document. The
      parsing flags @options are a combination of xmlParserOption. NzxmlReaderForDoc() failed)r)r2ZxmlReaderForDocrr�)r�r�rzr�r*rrr�readerForDoc�sr�cCs*tj||||�}|dkr td��t|d�S)z�Create 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() failed)r)r2ZxmlReaderForFdrr�)r�r�rzr�r*rrr�readerForFd�sr�cCs(tj|||�}|dkrtd��t|d�S)z}parse an XML file from the filesystem or the network. The
      parsing flags @options are a combination of xmlParserOption. NzxmlReaderForFile() failed)r)r2ZxmlReaderForFilerr�)r�rzr�r*rrr�
readerForFile�sr�cCs,tj|||||�}|dkr"td��t|d�S)z~Create an xmltextReader for an XML in-memory document. The
      parsing flags @options are a combination of xmlParserOption. NzxmlReaderForMemory() failed)r)r2ZxmlReaderForMemoryrr�)r�r�r�rzr�r*rrr�readerForMemory�sr�cCs$tj|�}|dkrtd��t|d�S)z�Parses 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() failed)r)r2ZxmlRegexpCompiler�xmlReg)Zregexpr*rrr�
regexpCompile�s
r�cCs&tj||�}|dkrtd��t|d�S)zkCreate an XML Schemas parse context for that memory buffer
       expected to contain an XML Schemas file. Nz"xmlSchemaNewMemParserCtxt() failed)r)r2ZxmlSchemaNewMemParserCtxtr�SchemaParserCtxt)r�r�r*rrr�schemaNewMemParserCtxt�sr�cCs$tj|�}|dkrtd��t|d�S)zkCreate an XML Schemas parse context for that file/resource
       expected to contain an XML Schemas file. NzxmlSchemaNewParserCtxt() failed)r)r2ZxmlSchemaNewParserCtxtrr�)r�r*rrr�schemaNewParserCtxt�s
r�cCstj�dS)z-Cleanup the default XML Schemas type library N)r2ZxmlSchemaCleanupTypesrrrr�schemaCleanupTypes�sr�cCstj|�}|S)z1Removes and normalize white spaces in the string )r2ZxmlSchemaCollapseString)rr*rrr�schemaCollapseString�s
r�cCstj�dS)z0Initialize the default XML Schemas type library N)r2ZxmlSchemaInitTypesrrrr�schemaInitTypes�sr�cCstj|�}|S)z(Replaces 0xd, 0x9 and 0xa with a space. )r2ZxmlSchemaWhiteSpaceReplace)rr*rrr�schemaWhiteSpaceReplace�s
r�cCstj||�}|S)zcompares the two UCS4 values )r2ZxmlUTF8Charcmp)Zutf1Zutf2r*rrr�UTF8Charcmp�sr�cCstj|�}|S)z1calculates the internal size of a UTF8 character )r2ZxmlUTF8Size)�utfr*rrr�UTF8Size�s
r�cCstj|�}|S)zncompute the length of an UTF8 string, it doesn't do a full
       UTF8 checking of the content of the string. )r2Z
xmlUTF8Strlen)r�r*rrr�
UTF8Strlen�s
r�cCstj||�}|S)z;a function to provide the relative location of a UTF8 char )r2Z
xmlUTF8Strloc)r�Zutfcharr*rrr�
UTF8Strlocsr�cCstj||�}|S)za strndup for array of UTF8's )r2ZxmlUTF8Strndup)r�r)r*rrr�UTF8Strndup	sr�cCstj||�}|S)zXa function to provide the equivalent of fetching a
       character from a string array )r2Z
xmlUTF8Strpos)r��posr*rrr�
UTF8Strpossr�cCstj||�}|S)zgstorage size of an UTF8 string the behaviour is not
       guaranteed if the input string is not UTF-8 )r2ZxmlUTF8Strsize)r�r)r*rrr�UTF8Strsizesr�cCstj|||�}|S)zgCreate a substring from a given UTF-8 string Note: 
       positions are given in units of UTF-8 chars )r2Z
xmlUTF8Strsub)r��startr)r*rrr�
UTF8Strsubsr�cCstj|�}|S)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. )r2ZxmlCheckUTF8)r�r*rrr�	checkUTF8 s
r�cCstj|�}|S)zFCheck whether the character is part of AegeanNumbers UCS
       Block )r2ZxmlUCSIsAegeanNumbers)�coder*rrr�uCSIsAegeanNumbers.s
r�cCstj|�}|S)zTCheck whether the character is part of
       AlphabeticPresentationForms UCS Block )r2Z#xmlUCSIsAlphabeticPresentationForms)r�r*rrr� uCSIsAlphabeticPresentationForms4s
r�cCstj|�}|S)z8Check whether the character is part of Arabic UCS Block )r2ZxmlUCSIsArabic)r�r*rrr�uCSIsArabic:s
r�cCstj|�}|S)zRCheck whether the character is part of
       ArabicPresentationForms-A UCS Block )r2Z xmlUCSIsArabicPresentationFormsA)r�r*rrr�uCSIsArabicPresentationFormsA?s
r�cCstj|�}|S)zRCheck whether the character is part of
       ArabicPresentationForms-B UCS Block )r2Z xmlUCSIsArabicPresentationFormsB)r�r*rrr�uCSIsArabicPresentationFormsBEs
r�cCstj|�}|S)z:Check whether the character is part of Armenian UCS Block )r2ZxmlUCSIsArmenian)r�r*rrr�
uCSIsArmenianKs
r�cCstj|�}|S)z8Check whether the character is part of Arrows UCS Block )r2ZxmlUCSIsArrows)r�r*rrr�uCSIsArrowsPs
r�cCstj|�}|S)z<Check whether the character is part of BasicLatin UCS Block )r2ZxmlUCSIsBasicLatin)r�r*rrr�uCSIsBasicLatinUs
r�cCstj|�}|S)z9Check whether the character is part of Bengali UCS Block )r2ZxmlUCSIsBengali)r�r*rrr�uCSIsBengaliZs
r�cCstj||�}|S)z5Check whether the character is part of the UCS Block )r2Z
xmlUCSIsBlock)r��blockr*rrr�
uCSIsBlock_sr�cCstj|�}|S)zFCheck whether the character is part of BlockElements UCS
       Block )r2ZxmlUCSIsBlockElements)r�r*rrr�uCSIsBlockElementsds
r�cCstj|�}|S)z:Check whether the character is part of Bopomofo UCS Block )r2ZxmlUCSIsBopomofo)r�r*rrr�
uCSIsBopomofojs
r�cCstj|�}|S)zICheck whether the character is part of BopomofoExtended UCS
       Block )r2ZxmlUCSIsBopomofoExtended)r�r*rrr�uCSIsBopomofoExtendedos
r�cCstj|�}|S)z<Check whether the character is part of BoxDrawing UCS Block )r2ZxmlUCSIsBoxDrawing)r�r*rrr�uCSIsBoxDrawingus
r�cCstj|�}|S)zHCheck whether the character is part of BraillePatterns UCS
       Block )r2ZxmlUCSIsBraillePatterns)r�r*rrr�uCSIsBraillePatternszs
r�cCstj|�}|S)z7Check whether the character is part of Buhid UCS Block )r2Z
xmlUCSIsBuhid)r�r*rrr�
uCSIsBuhid�s
r�cCstj|�}|S)zPCheck whether the character is part of
       ByzantineMusicalSymbols UCS Block )r2ZxmlUCSIsByzantineMusicalSymbols)r�r*rrr�uCSIsByzantineMusicalSymbols�s
r�cCstj|�}|S)zICheck whether the character is part of CJKCompatibility UCS
       Block )r2ZxmlUCSIsCJKCompatibility)r�r*rrr�uCSIsCJKCompatibility�s
r�cCstj|�}|S)zNCheck whether the character is part of
       CJKCompatibilityForms UCS Block )r2ZxmlUCSIsCJKCompatibilityForms)r�r*rrr�uCSIsCJKCompatibilityForms�s
r�cCstj|�}|S)zSCheck whether the character is part of
       CJKCompatibilityIdeographs UCS Block )r2Z"xmlUCSIsCJKCompatibilityIdeographs)r�r*rrr�uCSIsCJKCompatibilityIdeographs�s
r�cCstj|�}|S)z]Check whether the character is part of
       CJKCompatibilityIdeographsSupplement UCS Block )r2Z,xmlUCSIsCJKCompatibilityIdeographsSupplement)r�r*rrr�)uCSIsCJKCompatibilityIdeographsSupplement�s
r�cCstj|�}|S)zNCheck whether the character is part of
       CJKRadicalsSupplement UCS Block )r2ZxmlUCSIsCJKRadicalsSupplement)r�r*rrr�uCSIsCJKRadicalsSupplement�s
r�cCstj|�}|S)zQCheck whether the character is part of
       CJKSymbolsandPunctuation UCS Block )r2Z xmlUCSIsCJKSymbolsandPunctuation)r�r*rrr�uCSIsCJKSymbolsandPunctuation�s
r�cCstj|�}|S)zMCheck whether the character is part of CJKUnifiedIdeographs
       UCS Block )r2ZxmlUCSIsCJKUnifiedIdeographs)r�r*rrr�uCSIsCJKUnifiedIdeographs�s
r�cCstj|�}|S)zWCheck whether the character is part of
       CJKUnifiedIdeographsExtensionA UCS Block )r2Z&xmlUCSIsCJKUnifiedIdeographsExtensionA)r�r*rrr�#uCSIsCJKUnifiedIdeographsExtensionA�s
r�cCstj|�}|S)zWCheck whether the character is part of
       CJKUnifiedIdeographsExtensionB UCS Block )r2Z&xmlUCSIsCJKUnifiedIdeographsExtensionB)r�r*rrr�#uCSIsCJKUnifiedIdeographsExtensionB�s
r�cCstj||�}|S)z8Check whether the character is part of the UCS Category )r2ZxmlUCSIsCat)r��catr*rrr�uCSIsCat�sr�cCstj|�}|S)z6Check whether the character is part of C UCS Category )r2ZxmlUCSIsCatC)r�r*rrr�	uCSIsCatC�s
r�cCstj|�}|S)z7Check whether the character is part of Cc UCS Category )r2Z
xmlUCSIsCatCc)r�r*rrr�
uCSIsCatCc�s
r�cCstj|�}|S)z7Check whether the character is part of Cf UCS Category )r2Z
xmlUCSIsCatCf)r�r*rrr�
uCSIsCatCf�s
r�cCstj|�}|S)z7Check whether the character is part of Co UCS Category )r2Z
xmlUCSIsCatCo)r�r*rrr�
uCSIsCatCo�s
r�cCstj|�}|S)z7Check whether the character is part of Cs UCS Category )r2Z
xmlUCSIsCatCs)r�r*rrr�
uCSIsCatCs�s
r�cCstj|�}|S)z6Check whether the character is part of L UCS Category )r2ZxmlUCSIsCatL)r�r*rrr�	uCSIsCatL�s
r�cCstj|�}|S)z7Check whether the character is part of Ll UCS Category )r2Z
xmlUCSIsCatLl)r�r*rrr�
uCSIsCatLl�s
r�cCstj|�}|S)z7Check whether the character is part of Lm UCS Category )r2Z
xmlUCSIsCatLm)r�r*rrr�
uCSIsCatLm�s
r�cCstj|�}|S)z7Check whether the character is part of Lo UCS Category )r2Z
xmlUCSIsCatLo)r�r*rrr�
uCSIsCatLo�s
r�cCstj|�}|S)z7Check whether the character is part of Lt UCS Category )r2Z
xmlUCSIsCatLt)r�r*rrr�
uCSIsCatLt�s
r�cCstj|�}|S)z7Check whether the character is part of Lu UCS Category )r2Z
xmlUCSIsCatLu)r�r*rrr�
uCSIsCatLu�s
r�cCstj|�}|S)z6Check whether the character is part of M UCS Category )r2ZxmlUCSIsCatM)r�r*rrr�	uCSIsCatM�s
r�cCstj|�}|S)z7Check whether the character is part of Mc UCS Category )r2Z
xmlUCSIsCatMc)r�r*rrr�
uCSIsCatMc	s
r�cCstj|�}|S)z7Check whether the character is part of Me UCS Category )r2Z
xmlUCSIsCatMe)r�r*rrr�
uCSIsCatMe	s
r�cCstj|�}|S)z7Check whether the character is part of Mn UCS Category )r2Z
xmlUCSIsCatMn)r�r*rrr�
uCSIsCatMn	s
r�cCstj|�}|S)z6Check whether the character is part of N UCS Category )r2ZxmlUCSIsCatN)r�r*rrr�	uCSIsCatN	s
r�cCstj|�}|S)z7Check whether the character is part of Nd UCS Category )r2Z
xmlUCSIsCatNd)r�r*rrr�
uCSIsCatNd	s
r�cCstj|�}|S)z7Check whether the character is part of Nl UCS Category )r2Z
xmlUCSIsCatNl)r�r*rrr�
uCSIsCatNl	s
r�cCstj|�}|S)z7Check whether the character is part of No UCS Category )r2Z
xmlUCSIsCatNo)r�r*rrr�
uCSIsCatNo 	s
r�cCstj|�}|S)z6Check whether the character is part of P UCS Category )r2ZxmlUCSIsCatP)r�r*rrr�	uCSIsCatP%	s
r�cCstj|�}|S)z7Check whether the character is part of Pc UCS Category )r2Z
xmlUCSIsCatPc)r�r*rrr�
uCSIsCatPc*	s
r�cCstj|�}|S)z7Check whether the character is part of Pd UCS Category )r2Z
xmlUCSIsCatPd)r�r*rrr�
uCSIsCatPd/	s
r�cCstj|�}|S)z7Check whether the character is part of Pe UCS Category )r2Z
xmlUCSIsCatPe)r�r*rrr�
uCSIsCatPe4	s
r�cCstj|�}|S)z7Check whether the character is part of Pf UCS Category )r2Z
xmlUCSIsCatPf)r�r*rrr�
uCSIsCatPf9	s
r�cCstj|�}|S)z7Check whether the character is part of Pi UCS Category )r2Z
xmlUCSIsCatPi)r�r*rrr�
uCSIsCatPi>	s
rcCstj|�}|S)z7Check whether the character is part of Po UCS Category )r2Z
xmlUCSIsCatPo)r�r*rrr�
uCSIsCatPoC	s
rcCstj|�}|S)z7Check whether the character is part of Ps UCS Category )r2Z
xmlUCSIsCatPs)r�r*rrr�
uCSIsCatPsH	s
rcCstj|�}|S)z6Check whether the character is part of S UCS Category )r2ZxmlUCSIsCatS)r�r*rrr�	uCSIsCatSM	s
rcCstj|�}|S)z7Check whether the character is part of Sc UCS Category )r2Z
xmlUCSIsCatSc)r�r*rrr�
uCSIsCatScR	s
rcCstj|�}|S)z7Check whether the character is part of Sk UCS Category )r2Z
xmlUCSIsCatSk)r�r*rrr�
uCSIsCatSkW	s
rcCstj|�}|S)z7Check whether the character is part of Sm UCS Category )r2Z
xmlUCSIsCatSm)r�r*rrr�
uCSIsCatSm\	s
rcCstj|�}|S)z7Check whether the character is part of So UCS Category )r2Z
xmlUCSIsCatSo)r�r*rrr�
uCSIsCatSoa	s
rcCstj|�}|S)z6Check whether the character is part of Z UCS Category )r2ZxmlUCSIsCatZ)r�r*rrr�	uCSIsCatZf	s
rcCstj|�}|S)z7Check whether the character is part of Zl UCS Category )r2Z
xmlUCSIsCatZl)r�r*rrr�
uCSIsCatZlk	s
r	cCstj|�}|S)z7Check whether the character is part of Zp UCS Category )r2Z
xmlUCSIsCatZp)r�r*rrr�
uCSIsCatZpp	s
r
cCstj|�}|S)z7Check whether the character is part of Zs UCS Category )r2Z
xmlUCSIsCatZs)r�r*rrr�
uCSIsCatZsu	s
rcCstj|�}|S)z:Check whether the character is part of Cherokee UCS Block )r2ZxmlUCSIsCherokee)r�r*rrr�
uCSIsCherokeez	s
rcCstj|�}|S)zRCheck whether the character is part of
       CombiningDiacriticalMarks UCS Block )r2Z!xmlUCSIsCombiningDiacriticalMarks)r�r*rrr�uCSIsCombiningDiacriticalMarks	s
r
cCstj|�}|S)z\Check whether the character is part of
       CombiningDiacriticalMarksforSymbols UCS Block )r2Z+xmlUCSIsCombiningDiacriticalMarksforSymbols)r�r*rrr�(uCSIsCombiningDiacriticalMarksforSymbols�	s
rcCstj|�}|S)zKCheck whether the character is part of CombiningHalfMarks
       UCS Block )r2ZxmlUCSIsCombiningHalfMarks)r�r*rrr�uCSIsCombiningHalfMarks�	s
rcCstj|�}|S)zQCheck whether the character is part of
       CombiningMarksforSymbols UCS Block )r2Z xmlUCSIsCombiningMarksforSymbols)r�r*rrr�uCSIsCombiningMarksforSymbols�	s
rcCstj|�}|S)zHCheck whether the character is part of ControlPictures UCS
       Block )r2ZxmlUCSIsControlPictures)r�r*rrr�uCSIsControlPictures�	s
rcCstj|�}|S)zHCheck whether the character is part of CurrencySymbols UCS
       Block )r2ZxmlUCSIsCurrencySymbols)r�r*rrr�uCSIsCurrencySymbols�	s
rcCstj|�}|S)zICheck whether the character is part of CypriotSyllabary UCS
       Block )r2ZxmlUCSIsCypriotSyllabary)r�r*rrr�uCSIsCypriotSyllabary�	s
rcCstj|�}|S)z:Check whether the character is part of Cyrillic UCS Block )r2ZxmlUCSIsCyrillic)r�r*rrr�
uCSIsCyrillic�	s
rcCstj|�}|S)zKCheck whether the character is part of CyrillicSupplement
       UCS Block )r2ZxmlUCSIsCyrillicSupplement)r�r*rrr�uCSIsCyrillicSupplement�	s
rcCstj|�}|S)z9Check whether the character is part of Deseret UCS Block )r2ZxmlUCSIsDeseret)r�r*rrr�uCSIsDeseret�	s
rcCstj|�}|S)z<Check whether the character is part of Devanagari UCS Block )r2ZxmlUCSIsDevanagari)r�r*rrr�uCSIsDevanagari�	s
rcCstj|�}|S)z:Check whether the character is part of Dingbats UCS Block )r2ZxmlUCSIsDingbats)r�r*rrr�
uCSIsDingbats�	s
rcCstj|�}|S)zNCheck whether the character is part of
       EnclosedAlphanumerics UCS Block )r2ZxmlUCSIsEnclosedAlphanumerics)r�r*rrr�uCSIsEnclosedAlphanumerics�	s
rcCstj|�}|S)zTCheck whether the character is part of
       EnclosedCJKLettersandMonths UCS Block )r2Z#xmlUCSIsEnclosedCJKLettersandMonths)r�r*rrr� uCSIsEnclosedCJKLettersandMonths�	s
rcCstj|�}|S)z:Check whether the character is part of Ethiopic UCS Block )r2ZxmlUCSIsEthiopic)r�r*rrr�
uCSIsEthiopic�	s
rcCstj|�}|S)zKCheck whether the character is part of GeneralPunctuation
       UCS Block )r2ZxmlUCSIsGeneralPunctuation)r�r*rrr�uCSIsGeneralPunctuation�	s
rcCstj|�}|S)zHCheck whether the character is part of GeometricShapes UCS
       Block )r2ZxmlUCSIsGeometricShapes)r�r*rrr�uCSIsGeometricShapes�	s
rcCstj|�}|S)z:Check whether the character is part of Georgian UCS Block )r2ZxmlUCSIsGeorgian)r�r*rrr�
uCSIsGeorgian�	s
rcCstj|�}|S)z8Check whether the character is part of Gothic UCS Block )r2ZxmlUCSIsGothic)r�r*rrr�uCSIsGothic�	s
rcCstj|�}|S)z7Check whether the character is part of Greek UCS Block )r2Z
xmlUCSIsGreek)r�r*rrr�
uCSIsGreek�	s
r cCstj|�}|S)zFCheck whether the character is part of GreekExtended UCS
       Block )r2ZxmlUCSIsGreekExtended)r�r*rrr�uCSIsGreekExtended�	s
r!cCstj|�}|S)zGCheck whether the character is part of GreekandCoptic UCS
       Block )r2ZxmlUCSIsGreekandCoptic)r�r*rrr�uCSIsGreekandCoptic�	s
r"cCstj|�}|S)z:Check whether the character is part of Gujarati UCS Block )r2ZxmlUCSIsGujarati)r�r*rrr�
uCSIsGujarati�	s
r#cCstj|�}|S)z:Check whether the character is part of Gurmukhi UCS Block )r2ZxmlUCSIsGurmukhi)r�r*rrr�
uCSIsGurmukhi
s
r$cCstj|�}|S)zSCheck whether the character is part of
       HalfwidthandFullwidthForms UCS Block )r2Z"xmlUCSIsHalfwidthandFullwidthForms)r�r*rrr�uCSIsHalfwidthandFullwidthForms
s
r%cCstj|�}|S)zPCheck whether the character is part of
       HangulCompatibilityJamo UCS Block )r2ZxmlUCSIsHangulCompatibilityJamo)r�r*rrr�uCSIsHangulCompatibilityJamo
s
r&cCstj|�}|S)z<Check whether the character is part of HangulJamo UCS Block )r2ZxmlUCSIsHangulJamo)r�r*rrr�uCSIsHangulJamo
s
r'cCstj|�}|S)zHCheck whether the character is part of HangulSyllables UCS
       Block )r2ZxmlUCSIsHangulSyllables)r�r*rrr�uCSIsHangulSyllables
s
r(cCstj|�}|S)z9Check whether the character is part of Hanunoo UCS Block )r2ZxmlUCSIsHanunoo)r�r*rrr�uCSIsHanunoo
s
r)cCstj|�}|S)z8Check whether the character is part of Hebrew UCS Block )r2ZxmlUCSIsHebrew)r�r*rrr�uCSIsHebrew!
s
r*cCstj|�}|S)zQCheck whether the character is part of
       HighPrivateUseSurrogates UCS Block )r2Z xmlUCSIsHighPrivateUseSurrogates)r�r*rrr�uCSIsHighPrivateUseSurrogates&
s
r+cCstj|�}|S)zGCheck whether the character is part of HighSurrogates UCS
       Block )r2ZxmlUCSIsHighSurrogates)r�r*rrr�uCSIsHighSurrogates,
s
r,cCstj|�}|S)z:Check whether the character is part of Hiragana UCS Block )r2ZxmlUCSIsHiragana)r�r*rrr�
uCSIsHiragana2
s
r-cCstj|�}|S)zFCheck whether the character is part of IPAExtensions UCS
       Block )r2ZxmlUCSIsIPAExtensions)r�r*rrr�uCSIsIPAExtensions7
s
r.cCstj|�}|S)zYCheck whether the character is part of
       IdeographicDescriptionCharacters UCS Block )r2Z(xmlUCSIsIdeographicDescriptionCharacters)r�r*rrr�%uCSIsIdeographicDescriptionCharacters=
s
r/cCstj|�}|S)z8Check whether the character is part of Kanbun UCS Block )r2ZxmlUCSIsKanbun)r�r*rrr�uCSIsKanbunC
s
r0cCstj|�}|S)zGCheck whether the character is part of KangxiRadicals UCS
       Block )r2ZxmlUCSIsKangxiRadicals)r�r*rrr�uCSIsKangxiRadicalsH
s
r1cCstj|�}|S)z9Check whether the character is part of Kannada UCS Block )r2ZxmlUCSIsKannada)r�r*rrr�uCSIsKannadaN
s
r2cCstj|�}|S)z:Check whether the character is part of Katakana UCS Block )r2ZxmlUCSIsKatakana)r�r*rrr�
uCSIsKatakanaS
s
r3cCstj|�}|S)zSCheck whether the character is part of
       KatakanaPhoneticExtensions UCS Block )r2Z"xmlUCSIsKatakanaPhoneticExtensions)r�r*rrr�uCSIsKatakanaPhoneticExtensionsX
s
r4cCstj|�}|S)z7Check whether the character is part of Khmer UCS Block )r2Z
xmlUCSIsKhmer)r�r*rrr�
uCSIsKhmer^
s
r5cCstj|�}|S)zECheck whether the character is part of KhmerSymbols UCS
       Block )r2ZxmlUCSIsKhmerSymbols)r�r*rrr�uCSIsKhmerSymbolsc
s
r6cCstj|�}|S)z5Check whether the character is part of Lao UCS Block )r2ZxmlUCSIsLao)r�r*rrr�uCSIsLaoi
s
r7cCstj|�}|S)zJCheck whether the character is part of Latin-1Supplement
       UCS Block )r2ZxmlUCSIsLatin1Supplement)r�r*rrr�uCSIsLatin1Supplementn
s
r8cCstj|�}|S)zHCheck whether the character is part of LatinExtended-A UCS
       Block )r2ZxmlUCSIsLatinExtendedA)r�r*rrr�uCSIsLatinExtendedAt
s
r9cCstj|�}|S)zPCheck whether the character is part of
       LatinExtendedAdditional UCS Block )r2ZxmlUCSIsLatinExtendedAdditional)r�r*rrr�uCSIsLatinExtendedAdditionalz
s
r:cCstj|�}|S)zHCheck whether the character is part of LatinExtended-B UCS
       Block )r2ZxmlUCSIsLatinExtendedB)r�r*rrr�uCSIsLatinExtendedB�
s
r;cCstj|�}|S)zJCheck whether the character is part of LetterlikeSymbols
       UCS Block )r2ZxmlUCSIsLetterlikeSymbols)r�r*rrr�uCSIsLetterlikeSymbols�
s
r<cCstj|�}|S)z7Check whether the character is part of Limbu UCS Block )r2Z
xmlUCSIsLimbu)r�r*rrr�
uCSIsLimbu�
s
r=cCstj|�}|S)zICheck whether the character is part of LinearBIdeograms UCS
       Block )r2ZxmlUCSIsLinearBIdeograms)r�r*rrr�uCSIsLinearBIdeograms�
s
r>cCstj|�}|S)zICheck whether the character is part of LinearBSyllabary UCS
       Block )r2ZxmlUCSIsLinearBSyllabary)r�r*rrr�uCSIsLinearBSyllabary�
s
r?cCstj|�}|S)zFCheck whether the character is part of LowSurrogates UCS
       Block )r2ZxmlUCSIsLowSurrogates)r�r*rrr�uCSIsLowSurrogates�
s
r@cCstj|�}|S)z;Check whether the character is part of Malayalam UCS Block )r2ZxmlUCSIsMalayalam)r�r*rrr�uCSIsMalayalam�
s
rAcCstj|�}|S)zXCheck whether the character is part of
       MathematicalAlphanumericSymbols UCS Block )r2Z'xmlUCSIsMathematicalAlphanumericSymbols)r�r*rrr�$uCSIsMathematicalAlphanumericSymbols�
s
rBcCstj|�}|S)zNCheck whether the character is part of
       MathematicalOperators UCS Block )r2ZxmlUCSIsMathematicalOperators)r�r*rrr�uCSIsMathematicalOperators�
s
rCcCstj|�}|S)z[Check whether the character is part of
       MiscellaneousMathematicalSymbols-A UCS Block )r2Z)xmlUCSIsMiscellaneousMathematicalSymbolsA)r�r*rrr�&uCSIsMiscellaneousMathematicalSymbolsA�
s
rDcCstj|�}|S)z[Check whether the character is part of
       MiscellaneousMathematicalSymbols-B UCS Block )r2Z)xmlUCSIsMiscellaneousMathematicalSymbolsB)r�r*rrr�&uCSIsMiscellaneousMathematicalSymbolsB�
s
rEcCstj|�}|S)zMCheck whether the character is part of MiscellaneousSymbols
       UCS Block )r2ZxmlUCSIsMiscellaneousSymbols)r�r*rrr�uCSIsMiscellaneousSymbols�
s
rFcCstj|�}|S)zVCheck whether the character is part of
       MiscellaneousSymbolsandArrows UCS Block )r2Z%xmlUCSIsMiscellaneousSymbolsandArrows)r�r*rrr�"uCSIsMiscellaneousSymbolsandArrows�
s
rGcCstj|�}|S)zOCheck whether the character is part of
       MiscellaneousTechnical UCS Block )r2ZxmlUCSIsMiscellaneousTechnical)r�r*rrr�uCSIsMiscellaneousTechnical�
s
rHcCstj|�}|S)z;Check whether the character is part of Mongolian UCS Block )r2ZxmlUCSIsMongolian)r�r*rrr�uCSIsMongolian�
s
rIcCstj|�}|S)zGCheck whether the character is part of MusicalSymbols UCS
       Block )r2ZxmlUCSIsMusicalSymbols)r�r*rrr�uCSIsMusicalSymbols�
s
rJcCstj|�}|S)z9Check whether the character is part of Myanmar UCS Block )r2ZxmlUCSIsMyanmar)r�r*rrr�uCSIsMyanmar�
s
rKcCstj|�}|S)z=Check whether the character is part of NumberForms UCS Block )r2ZxmlUCSIsNumberForms)r�r*rrr�uCSIsNumberForms�
s
rLcCstj|�}|S)z7Check whether the character is part of Ogham UCS Block )r2Z
xmlUCSIsOgham)r�r*rrr�
uCSIsOgham�
s
rMcCstj|�}|S)z;Check whether the character is part of OldItalic UCS Block )r2ZxmlUCSIsOldItalic)r�r*rrr�uCSIsOldItalic�
s
rNcCstj|�}|S)zTCheck whether the character is part of
       OpticalCharacterRecognition UCS Block )r2Z#xmlUCSIsOpticalCharacterRecognition)r�r*rrr� uCSIsOpticalCharacterRecognition�
s
rOcCstj|�}|S)z7Check whether the character is part of Oriya UCS Block )r2Z
xmlUCSIsOriya)r�r*rrr�
uCSIsOriya�
s
rPcCstj|�}|S)z9Check whether the character is part of Osmanya UCS Block )r2ZxmlUCSIsOsmanya)r�r*rrr�uCSIsOsmanya�
s
rQcCstj|�}|S)zKCheck whether the character is part of PhoneticExtensions
       UCS Block )r2ZxmlUCSIsPhoneticExtensions)r�r*rrr�uCSIsPhoneticExtensionss
rRcCstj|�}|S)z<Check whether the character is part of PrivateUse UCS Block )r2ZxmlUCSIsPrivateUse)r�r*rrr�uCSIsPrivateUses
rScCstj|�}|S)zGCheck whether the character is part of PrivateUseArea UCS
       Block )r2ZxmlUCSIsPrivateUseArea)r�r*rrr�uCSIsPrivateUseAreas
rTcCstj|�}|S)z7Check whether the character is part of Runic UCS Block )r2Z
xmlUCSIsRunic)r�r*rrr�
uCSIsRunics
rUcCstj|�}|S)z9Check whether the character is part of Shavian UCS Block )r2ZxmlUCSIsShavian)r�r*rrr�uCSIsShavians
rVcCstj|�}|S)z9Check whether the character is part of Sinhala UCS Block )r2ZxmlUCSIsSinhala)r�r*rrr�uCSIsSinhalas
rWcCstj|�}|S)zJCheck whether the character is part of SmallFormVariants
       UCS Block )r2ZxmlUCSIsSmallFormVariants)r�r*rrr�uCSIsSmallFormVariants!s
rXcCstj|�}|S)zOCheck whether the character is part of
       SpacingModifierLetters UCS Block )r2ZxmlUCSIsSpacingModifierLetters)r�r*rrr�uCSIsSpacingModifierLetters's
rYcCstj|�}|S)z:Check whether the character is part of Specials UCS Block )r2ZxmlUCSIsSpecials)r�r*rrr�
uCSIsSpecials-s
rZcCstj|�}|S)zRCheck whether the character is part of
       SuperscriptsandSubscripts UCS Block )r2Z!xmlUCSIsSuperscriptsandSubscripts)r�r*rrr�uCSIsSuperscriptsandSubscripts2s
r[cCstj|�}|S)zMCheck whether the character is part of SupplementalArrows-A
       UCS Block )r2ZxmlUCSIsSupplementalArrowsA)r�r*rrr�uCSIsSupplementalArrowsA8s
r\cCstj|�}|S)zMCheck whether the character is part of SupplementalArrows-B
       UCS Block )r2ZxmlUCSIsSupplementalArrowsB)r�r*rrr�uCSIsSupplementalArrowsB>s
r]cCstj|�}|S)zZCheck whether the character is part of
       SupplementalMathematicalOperators UCS Block )r2Z)xmlUCSIsSupplementalMathematicalOperators)r�r*rrr�&uCSIsSupplementalMathematicalOperatorsDs
r^cCstj|�}|S)zVCheck whether the character is part of
       SupplementaryPrivateUseArea-A UCS Block )r2Z$xmlUCSIsSupplementaryPrivateUseAreaA)r�r*rrr�!uCSIsSupplementaryPrivateUseAreaAJs
r_cCstj|�}|S)zVCheck whether the character is part of
       SupplementaryPrivateUseArea-B UCS Block )r2Z$xmlUCSIsSupplementaryPrivateUseAreaB)r�r*rrr�!uCSIsSupplementaryPrivateUseAreaBPs
r`cCstj|�}|S)z8Check whether the character is part of Syriac UCS Block )r2ZxmlUCSIsSyriac)r�r*rrr�uCSIsSyriacVs
racCstj|�}|S)z9Check whether the character is part of Tagalog UCS Block )r2ZxmlUCSIsTagalog)r�r*rrr�uCSIsTagalog[s
rbcCstj|�}|S)z:Check whether the character is part of Tagbanwa UCS Block )r2ZxmlUCSIsTagbanwa)r�r*rrr�
uCSIsTagbanwa`s
rccCstj|�}|S)z6Check whether the character is part of Tags UCS Block )r2ZxmlUCSIsTags)r�r*rrr�	uCSIsTagses
rdcCstj|�}|S)z7Check whether the character is part of TaiLe UCS Block )r2Z
xmlUCSIsTaiLe)r�r*rrr�
uCSIsTaiLejs
recCstj|�}|S)zKCheck whether the character is part of TaiXuanJingSymbols
       UCS Block )r2ZxmlUCSIsTaiXuanJingSymbols)r�r*rrr�uCSIsTaiXuanJingSymbolsos
rfcCstj|�}|S)z7Check whether the character is part of Tamil UCS Block )r2Z
xmlUCSIsTamil)r�r*rrr�
uCSIsTamilus
rgcCstj|�}|S)z8Check whether the character is part of Telugu UCS Block )r2ZxmlUCSIsTelugu)r�r*rrr�uCSIsTeluguzs
rhcCstj|�}|S)z8Check whether the character is part of Thaana UCS Block )r2ZxmlUCSIsThaana)r�r*rrr�uCSIsThaanas
ricCstj|�}|S)z6Check whether the character is part of Thai UCS Block )r2ZxmlUCSIsThai)r�r*rrr�	uCSIsThai�s
rjcCstj|�}|S)z9Check whether the character is part of Tibetan UCS Block )r2ZxmlUCSIsTibetan)r�r*rrr�uCSIsTibetan�s
rkcCstj|�}|S)z:Check whether the character is part of Ugaritic UCS Block )r2ZxmlUCSIsUgaritic)r�r*rrr�
uCSIsUgaritic�s
rlcCstj|�}|S)z[Check whether the character is part of
       UnifiedCanadianAboriginalSyllabics UCS Block )r2Z*xmlUCSIsUnifiedCanadianAboriginalSyllabics)r�r*rrr�'uCSIsUnifiedCanadianAboriginalSyllabics�s
rmcCstj|�}|S)zKCheck whether the character is part of VariationSelectors
       UCS Block )r2ZxmlUCSIsVariationSelectors)r�r*rrr�uCSIsVariationSelectors�s
rncCstj|�}|S)zUCheck whether the character is part of
       VariationSelectorsSupplement UCS Block )r2Z$xmlUCSIsVariationSelectorsSupplement)r�r*rrr�!uCSIsVariationSelectorsSupplement�s
rocCstj|�}|S)z<Check whether the character is part of YiRadicals UCS Block )r2ZxmlUCSIsYiRadicals)r�r*rrr�uCSIsYiRadicals�s
rpcCstj|�}|S)z=Check whether the character is part of YiSyllables UCS Block )r2ZxmlUCSIsYiSyllables)r�r*rrr�uCSIsYiSyllables�s
rqcCstj|�}|S)zNCheck whether the character is part of
       YijingHexagramSymbols UCS Block )r2ZxmlUCSIsYijingHexagramSymbols)r�r*rrr�uCSIsYijingHexagramSymbols�s
rrcCstj|�dS)zqcheck the compiled lib version against the include one.
       This can warn or immediately kill the application N)r2ZxmlCheckVersion)r�rrr�checkVersion�srscCs"|dkrd}n|j}tj|�}|S)z/Pops the top XPath object from the value stack N)rr2�valuePop)r�rer*rrrrt�s

rtc@s>eZdZd�dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Z d>d?�Z!d@dA�Z"dBdC�Z#dDdE�Z$dFdG�Z%dHdI�Z&dJdK�Z'dLdM�Z(dNdO�Z)dPdQ�Z*dRdS�Z+dTdU�Z,dVdW�Z-dXdY�Z.dZd[�Z/d\d]�Z0d^d_�Z1d`da�Z2dbdc�Z3ddde�Z4dfdg�Z5dhdi�Z6djdk�Z7dldm�Z8dndo�Z9dpdq�Z:drds�Z;dtdu�Z<dvdw�Z=dxdy�Z>dzd{�Z?d|d}�Z@d~d�ZAd�d��ZBd�d��ZCd�d��ZDd�d��ZEd�d��ZFd�d��ZGd�d��ZHd�d��ZId�d��ZJd�d��ZKd�d��ZLd�d��ZMd�d��ZNd�d��ZOd�d��ZPd�d��ZQd�d��ZRd�d��ZSd�d��ZTd�d��ZUd�d��ZVd�d��ZWd�d��ZXd�d��ZYd�d��ZZd�d��Z[d�d��Z\d�d��Z]d�d��Z^d�d��Z_d�d��Z`d�d��Zad�d��Zbd�dÄZcd�dńZdd�dDŽZed�dɄZfd�d˄Zgd�d̈́ZhdS)�r�NcCs,t|�dkrtd��||_tj||d�dS)Nrz'xmlNode got a wrong wrapper object type)r)r�	TypeErrorrrXr)rrrrrr�szxmlNode.__init__cCsd|jtt|��fS)Nz<xmlNode (%s) object at 0x%x>)rC�intr)rrrr�__repr__�szxmlNode.__repr__cCs&tj|j�}|dkrdSt|d�}|S)zGet the namespace of a node N)r)r2ZxmlNodeGetNsrr�)rr*�
_xmlNode__tmprrr�ns�s

z
xmlNode.nscCs&tj|j�}|dkrdSt|d�}|S)zGet the namespace of a node N)r)r2ZxmlNodeGetNsDefsrr�)rr*rxrrr�nsDefs�s

zxmlNode.nsDefscCstj||j|�dS)zIDumps debug information for the element node, it is
           recursive N)r2ZxmlDebugDumpNoder)rr�depthrrr�
debugDumpNode�szxmlNode.debugDumpNodecCstj||j|�dS)zQDumps debug information for the list of element node, it is
           recursive N)r2ZxmlDebugDumpNodeListr)rrr{rrr�debugDumpNodeList�szxmlNode.debugDumpNodeListcCstj||j|�dS)zMDumps debug information for the element node, it is not
           recursive N)r2ZxmlDebugDumpOneNoder)rrr{rrr�debugDumpOneNode�szxmlNode.debugDumpOneNodecCstj|j�}|S)zCount the children of @node. )r2ZxmlLsCountNoder)rr*rrr�lsCountNode�szxmlNode.lsCountNodecCstj||j�dS)z,Dump to @output the type and name of @node. N)r2ZxmlLsOneNoder)rrrrr�	lsOneNode�szxmlNode.lsOneNodecCstj|j�dS)zPrint node to the output FILE N)r2ZxmlShellPrintNoder)rrrr�shellPrintNode�szxmlNode.shellPrintNodecCs@|dkrd}n|j}tj|j|�}|dkr2td��t|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() failed)r)rr2ZxmlAddChildrr�)rr��cur__or*rxrrr�addChilds
zxmlNode.addChildcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)zyAdd a list of node at the end of the child list of the
           parent merging adjacent TEXT nodes (@cur may be freed) NzxmlAddChildList() failed)r)rr2ZxmlAddChildListrr�)rr�r�r*rxrrr�addChildLists
zxmlNode.addChildListcCstj|j|�dS)z�Append the extra substring to the node content. NOTE: In
          contrast to xmlNodeSetContent(), @content is supposed to be
          raw text, so unescaped XML special chars are allowed,
           entity references are not supported. N)r2ZxmlNodeAddContentr)rrHrrr�
addContentszxmlNode.addContentcCstj|j||�dS)z�Append the extra substring to the node content. NOTE: In
          contrast to xmlNodeSetContentLen(), @content is supposed to
          be raw text, so unescaped XML special chars are allowed,
           entity references are not supported. N)r2ZxmlNodeAddContentLenr)rrHr)rrr�
addContentLen#szxmlNode.addContentLencCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)a�Add 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() failed)r)rr2ZxmlAddNextSiblingrr�)rrP�elem__or*rxrrr�addNextSibling*s
zxmlNode.addNextSiblingcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)a�Add 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() failed)r)rr2ZxmlAddPrevSiblingrr�)rrPr�r*rxrrr�addPrevSibling8s
zxmlNode.addPrevSiblingcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)z�Add a new element @elem to the list of siblings of @cur
          merging adjacent TEXT nodes (@elem may be freed) If the new
          element was already inserted in a document it is first
           unlinked from its existing context. NzxmlAddSibling() failed)r)rr2Z
xmlAddSiblingrr�)rrPr�r*rxrrr�
addSiblingGs
zxmlNode.addSiblingcCs,tj|j|�}|dkrtd��t|d�}|S)zDo a copy of the node. NzxmlCopyNode() failed)r)r2ZxmlCopyNoderrr�)r�extendedr*rxrrr�copyNodeSs

zxmlNode.copyNodecCs*tj|j�}|dkrtd��t|d�}|S)zqDo a recursive copy of the node list. Use
          xmlDocCopyNodeList() if possible to ensure string interning. NzxmlCopyNodeList() failed)r)r2ZxmlCopyNodeListrrr�)rr*rxrrr�copyNodeListZs

zxmlNode.copyNodeListcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)zDo a copy of the attribute. NzxmlCopyProp() failed)r)rr2�xmlCopyProprri)rr�r�r*rxrrr�copyPropbs
zxmlNode.copyPropcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)z Do a copy of an attribute list. NzxmlCopyPropList() failed)r)rr2�xmlCopyPropListrri)rr�r�r*rxrrr�copyPropListks
zxmlNode.copyPropListcCsB|dkrd}n|j}tj|j||�}|dkr4td��t|d�}|S)z+Do a copy of the node to a given document. NzxmlDocCopyNode() failed)r)rr2�xmlDocCopyNoderr�)rrsr��doc__or*rxrrr�docCopyNodets
zxmlNode.docCopyNodecCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)z&Do a recursive copy of the node list. NzxmlDocCopyNodeList() failed)r)rr2�xmlDocCopyNodeListrr�)rrsr�r*rxrrr�docCopyNodeList}s
zxmlNode.docCopyNodeListcCs<|dkrd}n|j}tj||j�}|dkr.dSt|d�}|S)zvSet the root element of the document (doc->children is a
           list containing possibly comments, PIs, etc ...). N)r)rr2�xmlDocSetRootElementr�)rrsr�r*rxrrr�docSetRootElement�s
zxmlNode.docSetRootElementcCs&tj|j�}|dkrdSt|d�}|S)aFinds the first child node of that element which is a
          Element node Note the handling of entities references is
          different than in the W3C DOM element traversal spec since
          we don't have back reference from entities content to
           entities references. N)r)r2ZxmlFirstElementChildrr�)rr*rxrrr�firstElementChild�s

zxmlNode.firstElementChildcCstj|j�dS)z�Free 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)r2ZxmlFreeNoder)rrrr�freeNode�szxmlNode.freeNodecCstj|j�dS)zlFree a node and all its siblings, this is a recursive
           behaviour, all the children are freed too. N)r2ZxmlFreeNodeListr)rrrr�freeNodeList�szxmlNode.freeNodeListcCs&|dkrd}n|j}tj||j�}|S)a�Searches for the BASE URL. The code should work on both XML
          and HTML document even if base mechanisms are completely
          different. It returns the base as defined in RFC 2396
          sections 5.1.1. Base URI within Document Content and 5.1.2.
          Base URI from the Encapsulating Entity However it does not
           return the document base (5.1.3), use doc->URL in this case N)rr2�xmlNodeGetBase)rrsr�r*rrr�getBase�s
zxmlNode.getBasecCstj|j�}|S)aRead the value of a node, this can be either the text
          carried directly by this node if it's a TEXT node or the
          aggregate string of the values carried by this node child's
           (TEXT and ENTITY_REF). Entity references are substituted. )r2rmr)rr*rrrr��szxmlNode.getContentcCstj|j�}|S)z�Searches the language of a node, i.e. the values of the
          xml:lang attribute or the one carried by the nearest
           ancestor. )r2ZxmlNodeGetLangr)rr*rrr�getLang�szxmlNode.getLangcCstj|j�}|S)z�Searches the space preserving behaviour of a node, i.e. the
          values of the xml:space attribute or the one carried by the
           nearest ancestor. )r2ZxmlNodeGetSpacePreserver)rr*rrr�getSpacePreserve�szxmlNode.getSpacePreservecCs*tj|j||�}|dkrdSt|d�}|S)a�Search for an attribute associated to a node This attribute
          has to be anchored in the namespace specified. This does
          the entity substitution. This function looks in DTD
          attribute declaration for #FIXED or default declaration
          values unless DTD use has been turned off. Note that a
           namespace of None indicates to use the default namespace. N)r)r2ZxmlHasNsProprri)rrC�	nameSpacer*rxrrr�	hasNsProp�s

zxmlNode.hasNsPropcCs(tj|j|�}|dkrdSt|d�}|S)z�Search an attribute associated to a node This function also
          looks in DTD attribute declaration for #FIXED or default
           declaration values unless DTD use has been turned off. N)r)r2Z
xmlHasProprri)rrCr*rxrrr�hasProp�s

zxmlNode.hasPropcCstj|j�}|S)zgChecks whether this node is an empty or whitespace only
           (and possibly ignorable) text-node. )r2ZxmlIsBlankNoder)rr*rrr�isBlankNode�szxmlNode.isBlankNodecCstj|j�}|S)zIs this node a Text node ? )r2Z
xmlNodeIsTextr)rr*rrr�isText�szxmlNode.isTextcCs*tj|j�}|dkrtd��t|d�}|S)z!Search the last child of a node. NzxmlGetLastChild() failed)r)r2ZxmlGetLastChildrrr�)rr*rxrrr�	lastChild�s

zxmlNode.lastChildcCs&tj|j�}|dkrdSt|d�}|S)aFinds the last child node of that element which is a
          Element node Note the handling of entities references is
          different than in the W3C DOM element traversal spec since
          we don't have back reference from entities content to
           entities references. N)r)r2ZxmlLastElementChildrr�)rr*rxrrr�lastElementChild�s

zxmlNode.lastElementChildcCstj|j�}|S)z�Get line number of @node. Try to override the limitation of
          lines being store in 16 bits ints if XML_PARSE_BIG_LINES
           parser option was used )r2ZxmlGetLineNor)rr*rrr�lineNo�szxmlNode.lineNocCs(|dkrd}n|j}tj||j|�}|S)z�Builds the string equivalent to the text contained in the
          Node list made of TEXTs and ENTITY_REFs, contrary to
          xmlNodeListGetString() this function doesn't do any
           character encoding handling. N)rr2�xmlNodeListGetRawString)rrs�inLiner�r*rrr�listGetRawString
s
zxmlNode.listGetRawStringcCs(|dkrd}n|j}tj||j|�}|S)zlBuild the string equivalent to the text contained in the
           Node list made of TEXTs and ENTITY_REFs N)rr2�xmlNodeListGetString)rrsr�r�r*rrr�
listGetString
s
zxmlNode.listGetStringcCsD|dkrd}n|j}tj|j|||�}|dkr6td��t|d�}|S)aQCreation of a new child element, added at the end of
          @parent children list. @ns and @content parameters are
          optional (None). If @ns is None, the newly created element
          inherits the namespace of @parent. If @content is non None,
          a child list containing the TEXTs and ENTITY_REFs node will
          be created. NOTE: @content is supposed to be a piece of XML
          CDATA, so it allows entity references. XML special chars
          must be escaped first by using
          xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
           be used. NzxmlNewChild() failed)r)rr2�xmlNewChildrr�)rryrCrH�ns__or*rxrrr�newChild
s
zxmlNode.newChildcCs.tj|j||�}|dkr td��t|d�}|S)aWCreation of a new Namespace. This function will refuse to
          create a namespace with a similar prefix than an existing
          one present on this node. Note that for a default
          namespace, @prefix should be None.  We use href==None in
          the case of an element creation where the namespace was not
           defined. NzxmlNewNs() failed)r)r2ZxmlNewNsrrr�)rr�r~r*rxrrr�newNs%
s

z
xmlNode.newNscCsD|dkrd}n|j}tj|j|||�}|dkr6td��t|d�}|S)zPCreate a new property tagged with a namespace and carried
           by a node. NzxmlNewNsProp() failed)r)rr2�xmlNewNsProprri)rryrCrr�r*rxrrr�	newNsProp1
s
zxmlNode.newNsPropcCsD|dkrd}n|j}tj|j|||�}|dkr6td��t|d�}|S)zPCreate a new property tagged with a namespace and carried
           by a node. NzxmlNewNsPropEatName() failed)r)rr2�xmlNewNsPropEatNamerri)rryrCrr�r*rxrrr�newNsPropEatName;
s
zxmlNode.newNsPropEatNamecCs.tj|j||�}|dkr td��t|d�}|S)z)Create a new property carried by a node. NzxmlNewProp() failed)r)r2Z
xmlNewProprrri)rrCrr*rxrrr�newPropE
s

zxmlNode.newPropcCsD|dkrd}n|j}tj|j|||�}|dkr6td��t|d�}|S)a�Creation of a new child element, added at the end of
          @parent children list. @ns and @content parameters are
          optional (None). If @ns is None, the newly created element
          inherits the namespace of @parent. If @content is non None,
          a child TEXT node will be created containing the string
          @content. NOTE: Use xmlNewChild() if @content will contain
          entities that need to be preserved. Use this function,
          xmlNewTextChild(), if you need to ensure that reserved XML
          chars that might appear in @content, such as the ampersand,
          greater-than or less-than signs, are automatically replaced
           by their XML escaped entity representations. NzxmlNewTextChild() failed)r)rr2�xmlNewTextChildrr�)rryrCrHr�r*rxrrr�newTextChildL
s
zxmlNode.newTextChildcCs&tj|j�}|dkrdSt|d�}|S)a&Finds the first closest next sibling of the node which is
          an element node. Note the handling of entities references
          is different than in the W3C DOM element traversal spec
          since we don't have back reference from entities content to
           entities references. N)r)r2ZxmlNextElementSiblingrr�)rr*rxrrr�nextElementSibling_
s

zxmlNode.nextElementSiblingcCstj|j|�}|S)arSearch and get the value of an attribute associated to a
          node This does the entity substitution. This function looks
          in DTD attribute declaration for #FIXED or default
          declaration values unless DTD use has been turned off. This
          function is similar to xmlGetProp except it will accept
           only an attribute in no namespace. )r2ZxmlGetNoNsPropr)rrCr*rrr�noNsPropj
szxmlNode.noNsPropcCstj|j�}|S)z0Build a structure based Path for the given node )r2ZxmlGetNodePathr)rr*rrr�nodePatht
szxmlNode.nodePathcCstj|j||�}|S)aFSearch and get the value of an attribute associated to a
          node This attribute has to be anchored in the namespace
          specified. This does the entity substitution. This function
          looks in DTD attribute declaration for #FIXED or default
           declaration values unless DTD use has been turned off. )r2ZxmlGetNsPropr)rrCr�r*rrr�nsPropy
szxmlNode.nsPropcCs&tj|j�}|dkrdSt|d�}|S)a*Finds the first closest previous sibling of the node which
          is an element node. Note the handling of entities
          references is different than in the W3C DOM element
          traversal spec since we don't have back reference from
           entities content to entities references. N)r)r2ZxmlPreviousElementSiblingrr�)rr*rxrrr�previousElementSibling�
s

zxmlNode.previousElementSiblingcCstj|j|�}|S)a�Search and get the value of an attribute associated to a
          node This does the entity substitution. This function looks
          in DTD attribute declaration for #FIXED or default
          declaration values unless DTD use has been turned off.
          NOTE: this function acts independently of namespaces
          associated to the attribute. Use xmlGetNsProp() or
           xmlGetNoNsProp() for namespace aware processing. )r2Z
xmlGetPropr)rrCr*rrr�prop�
szxmlNode.propcCs&|dkrd}n|j}tj||j�}|S)a!This function checks that all the namespaces declared
          within the given tree are properly declared. This is needed
          for example after Copy or Cut and then paste operations.
          The subtree may still hold pointers to namespace
          declarations outside the subtree or invalid/masked. As much
          as possible the function try to reuse the existing
          namespaces found in the new environment. If not possible
          the new namespaces are redeclared on @tree at the top of
           the given subtree. N)rr2�xmlReconciliateNs)rrsr�r*rrr�reconciliateNs�
s

zxmlNode.reconciliateNscCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)z�Unlink 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() failed)r)rr2ZxmlReplaceNoderr�)rr�r�r*rxrrr�replaceNode�
s
zxmlNode.replaceNodecCsB|dkrd}n|j}tj||j|�}|dkr4td��t|d�}|S)a�Search a Ns registered under a given name space for a
          document. recurse on the parents until it finds the defined
          namespace or return None otherwise. @nameSpace can be None,
          this is a search for the default namespace. We don't allow
          to cross entities boundaries. If you don't declare the
          namespace within those you will be in troubles !!! A
           warning is generated to cover this case. NzxmlSearchNs() failed)r)rr2�xmlSearchNsrr�)rrsr�r�r*rxrrr�searchNs�
s
zxmlNode.searchNscCsB|dkrd}n|j}tj||j|�}|dkr4td��t|d�}|S)z�Search a Ns aliasing a given URI. Recurse on the parents
          until it finds the defined namespace or return None
           otherwise. NzxmlSearchNsByHref() failed)r)rr2�xmlSearchNsByHrefrr�)rrsr�r�r*rxrrr�searchNsByHref�
s
zxmlNode.searchNsByHrefcCstj|j|�dS)z\Set (or reset) the base URI of a node, i.e. the value of
           the xml:base attribute. N)r2ZxmlNodeSetBaser)rr�rrr�setBase�
szxmlNode.setBasecCstj|j|�dS)a	Replace the content of a node. NOTE: @content is supposed
          to be a piece of XML CDATA, so it allows entity references,
          but XML special chars need to be escaped first by using
           xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). N)r2ZxmlNodeSetContentr)rrHrrr�
setContent�
szxmlNode.setContentcCstj|j||�dS)a	Replace the content of a node. NOTE: @content is supposed
          to be a piece of XML CDATA, so it allows entity references,
          but XML special chars need to be escaped first by using
           xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars(). N)r2ZxmlNodeSetContentLenr)rrHr)rrr�
setContentLen�
szxmlNode.setContentLencCstj|j|�dS)zRSet the language of a node, i.e. the values of the xml:lang
           attribute. N)r2ZxmlNodeSetLangr)rrVrrr�setLang�
szxmlNode.setLangcCs&|dkrd}n|j}tj|j|�dS)z<update all nodes in the list to point to the right document N)rr2�
xmlSetListDoc)rrsr�rrr�
setListDoc�
szxmlNode.setListDoccCstj|j|�dS)z#Set (or reset) the name of a node. N)r2ZxmlNodeSetNamer)rrCrrr�setName�
szxmlNode.setNamecCs&|dkrd}n|j}tj|j|�dS)z/Associate a namespace to a node, a posteriori. N)rr2�xmlSetNs)rryr�rrr�setNs�
sz
xmlNode.setNscCsD|dkrd}n|j}tj|j|||�}|dkr6td��t|d�}|S)zqSet (or reset) an attribute carried by a node. The ns
           structure must be in scope, this is not checked NzxmlSetNsProp() failed)r)rr2�xmlSetNsProprri)rryrCrr�r*rxrrr�	setNsProp�
s
zxmlNode.setNsPropcCs.tj|j||�}|dkr td��t|d�}|S)z�Set (or reset) an attribute carried by a node. If @name has
          a prefix, then the corresponding namespace-binding will be
          used, if in scope; it is an error it there's no such
           ns-binding for the prefix in scope. NzxmlSetProp() failed)r)r2Z
xmlSetProprrri)rrCrr*rxrrr�setProp�
s

zxmlNode.setPropcCstj|j|�dS)zoSet (or reset) the space preserving behaviour of a node,
           i.e. the value of the xml:space attribute. N)r2ZxmlNodeSetSpacePreserver)rr�rrr�setSpacePreserveszxmlNode.setSpacePreservecCs&|dkrd}n|j}tj|j|�dS)zJupdate all nodes under the tree to point to the right
           document N)rr2�
xmlSetTreeDoc)rrsr�rrr�
setTreeDoc
szxmlNode.setTreeDoccCstj|j||�}|S)zKConcat the given string at the end of the existing node
           content )r2Z
xmlTextConcatr)rrHr)r*rrr�
textConcatszxmlNode.textConcatcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)zMerge two text nodes into one NzxmlTextMerge() failed)r)rr2ZxmlTextMergerr�)r�secondZ	second__or*rxrrr�	textMerges
zxmlNode.textMergecCstj|j�dS)aUnlink a node from it's current context, the node is not
          freed If one need to free the node, use xmlFreeNode()
          routine after the unlink to discard it. Note that namespace
          nodes can't be unlinked as they do not have pointer to
           their parent. N)r2Z
xmlUnlinkNoder)rrrr�
unlinkNode#szxmlNode.unlinkNodecCs(|dkrd}n|j}tj|j||�}|S)z'Remove an attribute carried by a node. N)rr2�xmlUnsetNsProp)rryrCr�r*rrr�unsetNsProp+s
zxmlNode.unsetNsPropcCstj|j|�}|S)z`Remove an attribute carried by a node. This handles only
           attributes in no namespace. )r2ZxmlUnsetPropr)rrCr*rrr�	unsetProp2szxmlNode.unsetPropcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|�}|S)z�Determine whether an attribute is of type ID. In case we
          have DTD(s) then this is done if DTD loading has been
          requested. In the case of HTML documents parsed with the
           HTML parser, then ID detection is done systematically. N)rr2�xmlIsID)rrsrxr��attr__or*rrr�isID<szxmlNode.isIDcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|�}|S)z�Determine whether an attribute is of type Ref. In case we
          have DTD(s) then this is simple, otherwise we use an
           heuristic: name Ref (upper or lowercase). N)rr2�xmlIsRef)rrsrxr�r�r*rrr�isRefHsz
xmlNode.isRefcCs*|dkrd}n|j}tj||j||�}|S)a�Does the validation related extra step of the normalization
          of attribute values:  If the declared value is not CDATA,
          then the XML processor must further process the normalized
          attribute value by discarding any leading and trailing
          space (#x20) characters, and by replacing sequences of
           space (#x20) characters by single space (#x20) character. N)rr2�xmlValidNormalizeAttributeValue)rrsrCrr�r*rrr�validNormalizeAttributeValueSs
z$xmlNode.validNormalizeAttributeValuecCstj|j�}|S)z:Implement the XInclude substitution for the given subtree )r2ZxmlXIncludeProcessTreer)rr*rrr�xincludeProcessTreecszxmlNode.xincludeProcessTreecCstj|j|�}|S)z:Implement the XInclude substitution for the given subtree )r2ZxmlXIncludeProcessTreeFlagsr)r�flagsr*rrr�xincludeProcessTreeFlagshsz xmlNode.xincludeProcessTreeFlagscCs&|dkrd}n|j}tj||j�}|S)z<Validate a branch of a tree, starting with the given @elem. N)rr2�xmlSchemaValidateOneElement)rr�rer*rrr�schemaValidateOneElementqs
z xmlNode.schemaValidateOneElementcCstj|j�}|S)z$Converts a node to its number value )r2ZxmlXPathCastNodeToNumberr)rr*rrr�xpathCastNodeToNumber|szxmlNode.xpathCastNodeToNumbercCstj|j�}|S)z%Converts a node to its string value. )r2ZxmlXPathCastNodeToStringr)rr*rrr�xpathCastNodeToString�szxmlNode.xpathCastNodeToStringcCs&|dkrd}n|j}tj|j|�}|S)z'Compare two nodes w.r.t document order N)rr2ZxmlXPathCmpNodes)rZnode2Znode2__or*rrr�
xpathCmpNodes�s
zxmlNode.xpathCmpNodescCs<|dkrd}n|j}tj|j||�}|dkr4td��t|�S)z�Evaluate the XPath Location Path in the given context. The
          node 'node' is set as the context node. The context node is
           not restored. NzxmlXPathNodeEval() failed)rr2ZxmlXPathNodeEvalrr�)rr.r�Zctx__or*rrr�
xpathNodeEval�szxmlNode.xpathNodeEvalcCs$tj|j�}|dkrtd��t|�S)zfCreate a new xmlXPathObjectPtr of type NodeSet and
           initialize it with the single Node @val NzxmlXPathNewNodeSet() failed)r2ZxmlXPathNewNodeSetrrr�)rr*rrr�xpathNewNodeSet�szxmlNode.xpathNewNodeSetcCs$tj|j�}|dkrtd��t|�S)znCreate a new xmlXPathObjectPtr of type Value Tree (XSLT)
           and initialize it with the tree root @val NzxmlXPathNewValueTree() failed)r2ZxmlXPathNewValueTreerrr�)rr*rrr�xpathNewValueTree�szxmlNode.xpathNewValueTreecCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)a�Traversal 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() failed)r)rr2�xmlXPathNextAncestorrr�)rr�rer*rxrrr�xpathNextAncestor�s
zxmlNode.xpathNextAncestorcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)asTraversal 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() failed)r)rr2�xmlXPathNextAncestorOrSelfrr�)rr�rer*rxrrr�xpathNextAncestorOrSelf�s
zxmlNode.xpathNextAncestorOrSelfcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)zkTraversal function for the "attribute" direction TODO:
           support DTD inherited default attributes NzxmlXPathNextAttribute() failed)r)rr2�xmlXPathNextAttributerr�)rr�rer*rxrrr�xpathNextAttribute�s
zxmlNode.xpathNextAttributecCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)z�Traversal function for the "child" direction The child axis
          contains the children of the context node in document order. NzxmlXPathNextChild() failed)r)rr2�xmlXPathNextChildrr�)rr�rer*rxrrr�xpathNextChild�s
zxmlNode.xpathNextChildcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)z�Traversal 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() failed)r)rr2�xmlXPathNextDescendantrr�)rr�rer*rxrrr�xpathNextDescendant�s
zxmlNode.xpathNextDescendantcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)aZTraversal 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() failed)r)rr2�xmlXPathNextDescendantOrSelfrr�)rr�rer*rxrrr�xpathNextDescendantOrSelf�s
z!xmlNode.xpathNextDescendantOrSelfcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)a[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() failed)r)rr2�xmlXPathNextFollowingrr�)rr�rer*rxrrr�xpathNextFollowing�s
zxmlNode.xpathNextFollowingcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)z�Traversal function for the "following-sibling" direction
          The following-sibling axis contains the following siblings
           of the context node in document order. Nz%xmlXPathNextFollowingSibling() failed)r)rr2�xmlXPathNextFollowingSiblingrr�)rr�rer*rxrrr�xpathNextFollowingSiblings
z!xmlNode.xpathNextFollowingSiblingcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)aYTraversal 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() failed)r)rr2�xmlXPathNextNamespacerr�)rr�rer*rxrrr�xpathNextNamespace
s
zxmlNode.xpathNextNamespacecCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)z�Traversal function for the "parent" direction The parent
          axis contains the parent of the context node, if there is
           one. NzxmlXPathNextParent() failed)r)rr2�xmlXPathNextParentrr�)rr�rer*rxrrr�xpathNextParents
zxmlNode.xpathNextParentcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)abTraversal 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() failed)r)rr2�xmlXPathNextPrecedingrr�)rr�rer*rxrrr�xpathNextPreceding&s
zxmlNode.xpathNextPrecedingcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)aCTraversal 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() failed)r)rr2�xmlXPathNextPrecedingSiblingrr�)rr�rer*rxrrr�xpathNextPrecedingSibling4s
z!xmlNode.xpathNextPrecedingSiblingcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)zkTraversal function for the "self" direction The self axis
           contains just the context node itself NzxmlXPathNextSelf() failed)r)rr2�xmlXPathNextSelfrr�)rr�rer*rxrrr�
xpathNextSelfAs
zxmlNode.xpathNextSelfcCs$tj|j�}|dkrtd��t|�S)zMCreate a new xmlXPathObjectPtr of type range using a single
           nodes Nz!xmlXPtrNewCollapsedRange() failed)r2ZxmlXPtrNewCollapsedRangerrr�)rr*rrr�xpointerNewCollapsedRangeOsz!xmlNode.xpointerNewCollapsedRangecCsV|dkrd}n|j}|dkr"d}n|j}tj||j|�}|dkrHtd��t|d�}|S)zCreate a new XPointer context NzxmlXPtrNewContext() failed)r)rr2�xmlXPtrNewContextr�xpathContext)rrs�originr��	origin__or*rxrrr�xpointerNewContextVs
zxmlNode.xpointerNewContextcCs:|dkrd}n|j}tj|j|�}|dkr2td��t|�S)z�Create a new xmlXPathObjectPtr of type LocationSet and
          initialize it with the single range made of the two nodes
           @start and @end Nz#xmlXPtrNewLocationSetNodes() failed)rr2ZxmlXPtrNewLocationSetNodesrr�)r�end�end__or*rrr�xpointerNewLocationSetNodesasz#xmlNode.xpointerNewLocationSetNodescCs>|dkrd}n|j}tj|j|||�}|dkr6td��t|�S)z-Create a new xmlXPathObjectPtr of type range NzxmlXPtrNewRange() failed)rr2ZxmlXPtrNewRangerr�)rZ
startindexr
Zendindexrr*rrr�xpointerNewRangekszxmlNode.xpointerNewRangecCs:|dkrd}n|j}tj|j|�}|dkr2td��t|�S)z;Create a new xmlXPathObjectPtr of type range using 2 nodes NzxmlXPtrNewRangeNodes() failed)rr2ZxmlXPtrNewRangeNodesrr�)rr
rr*rrr�xpointerNewRangeNodessszxmlNode.xpointerNewRangeNodes)N)irrrrrwryrzr|r}r~rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrrrrrr��s�


				
	



	

	
	



r�c@sfeZdZd�dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Z d>d?�Z!d@dA�Z"dBdC�Z#dDdE�Z$dFdG�Z%dHdI�Z&dJdK�Z'dLdM�Z(dNdO�Z)dPdQ�Z*dRdS�Z+dTdU�Z,dVdW�Z-dXdY�Z.dZd[�Z/d\d]�Z0d^d_�Z1d`da�Z2dbdc�Z3ddde�Z4dfdg�Z5dhdi�Z6djdk�Z7dldm�Z8dndo�Z9dpdq�Z:drds�Z;dtdu�Z<dvdw�Z=dxdy�Z>dzd{�Z?d|d}�Z@d~d�ZAd�d��ZBd�d��ZCd�d��ZDd�d��ZEd�d��ZFd�d��ZGd�d��ZHd�d��ZId�d��ZJd�d��ZKd�d��ZLd�d��ZMd�d��ZNd�d��ZOd�d��ZPd�d��ZQd�d��ZRd�d��ZSd�d��ZTd�d��ZUd�d��ZVd�d��ZWd�d��ZXd�d��ZYd�d��ZZd�d��Z[d�d��Z\d�d��Z]d�d��Z^d�d��Z_d�d��Z`d�d��Zad�d��Zbd�dÄZcd�dńZdd�dDŽZed�dɄZfd�d˄Zgd�d̈́Zhd�dτZid�dфZjd�dӄZkd�dՄZld�dׄZmdS)�rtNcCs,t|�dkrtd��||_tj||d�dS)Nrz&xmlDoc got a wrong wrapper object type)r)rrurr�r)rrrrrr|szxmlDoc.__init__cCsd|jtt|��fS)Nz<xmlDoc (%s) object at 0x%x>)rCrvr)rrrrrw�szxmlDoc.__repr__cCstj|j||�}|S)z�The 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. )r2�htmlAutoCloseTagr)rrCrPr*rrrr�szxmlDoc.htmlAutoCloseTagcCstj|j|�}|S)z�The 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 )r2�htmlIsAutoClosedr)rrPr*rrrr�szxmlDoc.htmlIsAutoClosedcCs*|dkrd}n|j}tj||j||�dS)zDump an HTML document. N)rr2�htmlDocContentDumpFormatOutput)r�bufrzr{�buf__orrrr�sz%xmlDoc.htmlDocContentDumpFormatOutputcCs(|dkrd}n|j}tj||j|�dS)z:Dump an HTML document. Formating return/spaces are added. N)rr2�htmlDocContentDumpOutput)rrrzrrrrr�szxmlDoc.htmlDocContentDumpOutputcCstj||j�}|S)z'Dump an HTML document to an open FILE. )r2�htmlDocDumpr)rr�r*rrrr�szxmlDoc.htmlDocDumpcCstj|j�}|S)z,Encoding definition lookup in the Meta tags )r2�htmlGetMetaEncodingr)rr*rrrr�szxmlDoc.htmlGetMetaEncodingcCs(|dkrd}n|j}tj||j|�dS)znDump an HTML node, recursive behaviour,children are printed
           too, and formatting returns are added. N)rr2�htmlNodeDumpFile)rr�r�r�rrrr�szxmlDoc.htmlNodeDumpFilecCs,|dkrd}n|j}tj||j|||�}|S)z�Dump an HTML node, recursive behaviour,children are printed
          too.  TODO: if encoding == None try to save in the doc
           encoding N)rr2�htmlNodeDumpFileFormat)rr�r�rzr{r�r*rrrr�s
zxmlDoc.htmlNodeDumpFileFormatcCs@|dkrd}n|j}|dkr"d}n|j}tj||j|||�dS)zLDump an HTML node, recursive behaviour,children are printed
           too. N)rr2�htmlNodeDumpFormatOutput)rrr�rzr{rr�rrrr�szxmlDoc.htmlNodeDumpFormatOutputcCs>|dkrd}n|j}|dkr"d}n|j}tj||j||�dS)zuDump an HTML node, recursive behaviour,children are printed
           too, and formatting returns/spaces are added. N)rr2�htmlNodeDumpOutput)rrr�rzrr�rrrr�szxmlDoc.htmlNodeDumpOutputcCstj||j�}|S)zYDump an HTML document to a file. If @filename is "-" the
           stdout file is used. )r2�htmlSaveFiler)rr�r*rrrr�szxmlDoc.htmlSaveFilecCstj||j|�}|S)zkDump an HTML document to a file using a given encoding and
           formatting returns/spaces are added. )r2�htmlSaveFileEncr)rr�rzr*rrrr�szxmlDoc.htmlSaveFileEnccCstj||j||�}|S)z8Dump an HTML document to a file using a given encoding. )r2�htmlSaveFileFormatr)rr�rzr{r*rrrr �szxmlDoc.htmlSaveFileFormatcCstj|j|�}|S)z�Sets the current encoding in the Meta tags NOTE: this will
          not change the document content encoding, just the META
           flag associated. )r2�htmlSetMetaEncodingr)rrzr*rrrr!�szxmlDoc.htmlSetMetaEncodingcCstj||j�}|S)z_Check the document for potential content problems, and
           output the errors to @output )r2ZxmlDebugCheckDocumentr)rrr*rrr�debugCheckDocument�szxmlDoc.debugCheckDocumentcCstj||j�dS)z9Dumps debug information for the document, it's recursive N)r2ZxmlDebugDumpDocumentr)rrrrr�debugDumpDocument�szxmlDoc.debugDumpDocumentcCstj||j�dS)zIDumps debug information cncerning the document, not
           recursive N)r2ZxmlDebugDumpDocumentHeadr)rrrrr�debugDumpDocumentHead�szxmlDoc.debugDumpDocumentHeadcCstj||j�dS)zODumps debug information for all the entities in use by the
           document N)r2ZxmlDebugDumpEntitiesr)rrrrr�debugDumpEntities�szxmlDoc.debugDumpEntitiescCs4tj|j|||||�}|dkr&td��t|d�}|S)z)Register a new entity for this document. NzxmlAddDocEntity() failed)r)r2ZxmlAddDocEntityrrr�)rrCr
r�rGrHr*�_xmlDoc__tmprrr�addDocEntitys

zxmlDoc.addDocEntitycCs4tj|j|||||�}|dkr&td��t|d�}|S)z=Register a new entity for this document DTD external subset. NzxmlAddDtdEntity() failed)r)r2ZxmlAddDtdEntityrrr�)rrCr
r�rGrHr*r&rrr�addDtdEntitys

zxmlDoc.addDtdEntitycCs,tj|j|�}|dkrtd��t|d�}|S)z:Do an entity lookup in the document entity hash table and NzxmlGetDocEntity() failed)r)r2ZxmlGetDocEntityrrr�)rrCr*r&rrr�	docEntitys

zxmlDoc.docEntitycCs,tj|j|�}|dkrtd��t|d�}|S)z5Do an entity lookup in the DTD entity hash table and NzxmlGetDtdEntity() failed)r)r2ZxmlGetDtdEntityrrr�)rrCr*r&rrr�	dtdEntitys

zxmlDoc.dtdEntitycCstj|j|�}|S)z�TODO: remove xmlEncodeEntities, once we are not afraid of
          breaking binary compatibility  People must migrate their
          code to xmlEncodeEntitiesReentrant ! This routine will
           issue a warning when encountered. )r2ZxmlEncodeEntitiesr)rr�r*rrr�encodeEntities#szxmlDoc.encodeEntitiescCstj|j|�}|S)aDo a global encoding of a string, replacing the predefined
          entities and non ASCII values with their entities and
          CharRef counterparts. Contrary to xmlEncodeEntities, this
           routine is reentrant, and result must be deallocated. )r2ZxmlEncodeEntitiesReentrantr)rr�r*rrr�encodeEntitiesReentrant+szxmlDoc.encodeEntitiesReentrantcCstj|j|�}|S)z�Do a global encoding of a string, replacing the predefined
          entities this routine is reentrant, and result must be
           deallocated. )r2ZxmlEncodeSpecialCharsr)rr�r*rrr�encodeSpecialChars3szxmlDoc.encodeSpecialCharscCs4tj|j|||||�}|dkr&td��t|d�}|S)aQCreate a new entity, this differs from xmlAddDocEntity()
          that if the document is None or has no internal subset
          defined, then an unlinked entity structure will be
          returned, it is then the responsability of the caller to
          link it to the document later or free it when not needed
           anymore. NzxmlNewEntity() failed)r)r2ZxmlNewEntityrrr�)rrCr
r�rGrHr*r&rrr�	newEntity:s

zxmlDoc.newEntitycCs,tj|j|�}|dkrtd��t|d�}|S)z=Do an entity lookup in the internal and external subsets and NzxmlGetParameterEntity() failed)r)r2ZxmlGetParameterEntityrrr�)rrCr*r&rrr�parameterEntityFs

zxmlDoc.parameterEntitycCs*tj|j�}|dkrtd��t|d�}|S)z�Create an XML RelaxNGs parser context for that document.
          Note: since the process of compiling a RelaxNG schemas
          modifies the document, the @doc parameter is duplicated
           internally. Nz#xmlRelaxNGNewDocParserCtxt() failed)r)r2ZxmlRelaxNGNewDocParserCtxtrrr{)rr*r&rrr�relaxNGNewDocParserCtxtQs

zxmlDoc.relaxNGNewDocParserCtxtcCs&|dkrd}n|j}tj||j�}|S)z$Validate a document tree in memory. N)rr2�xmlRelaxNGValidateDoc)rr�rer*rrr�relaxNGValidateDoc[s
zxmlDoc.relaxNGValidateDoccCs<|dkrd}n|j}|dkr"d}n|j}tj||j|�}|S)z�Validate a full subtree when
          xmlRelaxNGValidatePushElement() returned 0 and the content
           of the node has been expanded. N)rr2�xmlRelaxNGValidateFullElement)rr�rPrer�r*rrr�relaxNGValidateFullElementbsz!xmlDoc.relaxNGValidateFullElementcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|�}|S)z7Pop the element end from the RelaxNG validation stack. N)rr2�xmlRelaxNGValidatePopElement)rr�rPrer�r*rrr�relaxNGValidatePopElementmsz xmlDoc.relaxNGValidatePopElementcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|�}|S)z:Push a new element start on the RelaxNG validation stack. N)rr2�xmlRelaxNGValidatePushElement)rr�rPrer�r*rrr�relaxNGValidatePushElementvsz!xmlDoc.relaxNGValidatePushElementcCs,tj|j|�}|dkrtd��t|d�}|S)z�Do a copy of the document info. If recursive, the content
          tree will be copied too as well as DTD, namespaces and
           entities. NzxmlCopyDoc() failed)r)r2Z
xmlCopyDocrrrt)r�	recursiver*r&rrr�copyDoc�s

zxmlDoc.copyDoccCsB|dkrd}n|j}tj||j|�}|dkr4td��t|d�}|S)z+Do a copy of the node to a given document. NzxmlDocCopyNode() failed)r)rr2r�rr�)rr�r��node__or*r&rrrr��s
zxmlDoc.copyNodecCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)z&Do a recursive copy of the node list. NzxmlDocCopyNodeList() failed)r)rr2r�rr�)rr�r;r*r&rrrr��s
zxmlDoc.copyNodeListcCs0tj|j|||�}|dkr"td��t|d�}|S)z)Create the internal subset of a document NzxmlCreateIntSubset() failed)r)r2ZxmlCreateIntSubsetrrr�)rrCr�rGr*r&rrr�createIntSubset�s

zxmlDoc.createIntSubsetcCstj|j�}|S)z5get the compression ratio for a document, ZLIB based )r2ZxmlGetDocCompressModer)rr*rrr�docCompressMode�szxmlDoc.docCompressModecCstj||j�}|S)z&Dump an XML document to an open FILE. )r2Z
xmlDocDumpr)rr�r*rrr�dump�szxmlDoc.dumpcCs(|dkrd}n|j}tj||j|�dS)zQDump an XML/HTML node, recursive behaviour, children are
           printed too. N)rr2ZxmlElemDump)rr�r�r�rrr�elemDump�szxmlDoc.elemDumpcCstj||j|�}|S)z&Dump an XML document to an open FILE. )r2ZxmlDocFormatDumpr)rr�r{r*rrr�
formatDump�szxmlDoc.formatDumpcCstj|j�dS)zIFree up all the structures used by a document, tree
           included. N)r2r�r)rrrr�freeDoc�szxmlDoc.freeDoccCs*tj|j�}|dkrtd��t|d�}|S)zvGet the root element of the document (doc->children is a
           list containing possibly comments, PIs, etc ...). NzxmlDocGetRootElement() failed)r)r2ZxmlDocGetRootElementrrr�)rr*r&rrr�getRootElement�s

zxmlDoc.getRootElementcCs*tj|j�}|dkrtd��t|d�}|S)z&Get the internal subset of a document NzxmlGetIntSubset() failed)r)r2ZxmlGetIntSubsetrrr�)rr*r&rrr�	intSubset�s

zxmlDoc.intSubsetcCs.tj|j||�}|dkr td��t|d�}|S)z1Creation of a new node containing a CDATA block. NzxmlNewCDataBlock() failed)r)r2ZxmlNewCDataBlockrrr�)rrHr)r*r&rrr�
newCDataBlock�s

zxmlDoc.newCDataBlockcCs,tj|j|�}|dkrtd��t|d�}|S)z,Creation of a new character reference node. NzxmlNewCharRef() failed)r)r2Z
xmlNewCharRefrrr�)rrCr*r&rrr�
newCharRef�s

zxmlDoc.newCharRefcCs,tj|j|�}|dkrtd��t|d�}|S)zJCreation of a new node containing a comment within a
           document. NzxmlNewDocComment() failed)r)r2ZxmlNewDocCommentrrr�)rrHr*r&rrr�
newDocComment�s

zxmlDoc.newDocCommentcCs*tj|j�}|dkrtd��t|d�}|S)z!Creation of a new Fragment node. NzxmlNewDocFragment() failed)r)r2ZxmlNewDocFragmentrrr�)rr*r&rrr�newDocFragment�s

zxmlDoc.newDocFragmentcCsD|dkrd}n|j}tj|j|||�}|dkr6td��t|d�}|S)atCreation of a new node element within a document. @ns and
          @content are optional (None). NOTE: @content is supposed to
          be a piece of XML CDATA, so it allow entities references,
          but XML special chars need to be escaped first by using
          xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
           don't need entities support. NzxmlNewDocNode() failed)r)rr2�
xmlNewDocNoderr�)rryrCrHr�r*r&rrr�
newDocNode�s
zxmlDoc.newDocNodecCsD|dkrd}n|j}tj|j|||�}|dkr6td��t|d�}|S)atCreation of a new node element within a document. @ns and
          @content are optional (None). NOTE: @content is supposed to
          be a piece of XML CDATA, so it allow entities references,
          but XML special chars need to be escaped first by using
          xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
           don't need entities support. NzxmlNewDocNodeEatName() failed)r)rr2�xmlNewDocNodeEatNamerr�)rryrCrHr�r*r&rrr�newDocNodeEatName�s
zxmlDoc.newDocNodeEatNamecCs.tj|j||�}|dkr td��t|d�}|S)z.Creation of a processing instruction element. NzxmlNewDocPI() failed)r)r2ZxmlNewDocPIrrr�)rrCrHr*r&rrr�newDocPIs

zxmlDoc.newDocPIcCs.tj|j||�}|dkr td��t|d�}|S)z-Create a new property carried by a document. NzxmlNewDocProp() failed)r)r2Z
xmlNewDocProprrri)rrCrr*r&rrr�
newDocProps

zxmlDoc.newDocPropcCsD|dkrd}n|j}tj|j|||�}|dkr6td��t|d�}|S)zcCreation of a new node element within a document. @ns and
           @content are optional (None). NzxmlNewDocRawNode() failed)r)rr2�xmlNewDocRawNoderr�)rryrCrHr�r*r&rrr�
newDocRawNodes
zxmlDoc.newDocRawNodecCs,tj|j|�}|dkrtd��t|d�}|S)z/Creation of a new text node within a document. NzxmlNewDocText() failed)r)r2Z
xmlNewDocTextrrr�)rrHr*r&rrr�
newDocText s

zxmlDoc.newDocTextcCs.tj|j||�}|dkr td��t|d�}|S)zzCreation of a new text node with an extra content length
           parameter. The text node pertain to a given document. NzxmlNewDocTextLen() failed)r)r2ZxmlNewDocTextLenrrr�)rrHr)r*r&rrr�
newDocTextLen's

zxmlDoc.newDocTextLencCs0tj|j|||�}|dkr"td��t|d�}|S)zrCreation of a new DTD for the external subset. To create an
           internal subset, use xmlCreateIntSubset(). NzxmlNewDtd() failed)r)r2Z	xmlNewDtdrrr�)rrCr�rGr*r&rrr�newDtd/s

z
xmlDoc.newDtdcCs.tj|j||�}|dkr td��t|d�}|S)z\Creation of a Namespace, the old way using PI and without
           scoping DEPRECATED !!! NzxmlNewGlobalNs() failed)r)r2ZxmlNewGlobalNsrrr�)rr�r~r*r&rrr�newGlobalNs7s

zxmlDoc.newGlobalNscCs,tj|j|�}|dkrtd��t|d�}|S)z"Creation of a new reference node. NzxmlNewReference() failed)r)r2ZxmlNewReferencerrr�)rrCr*r&rrr�newReference?s

zxmlDoc.newReferencecCsB|dkrd}n|j}|dkr"d}n|j}tj||j||||�dS)z�Dump an XML node, recursive behaviour, children are printed
          too. Note that @format = 1 provide node indenting only if
          xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
           called N)rr2�xmlNodeDumpOutput)rrr�rr{rzrr�rrr�nodeDumpOutputFszxmlDoc.nodeDumpOutputcCs&|dkrd}n|j}tj|j|�}|S)a�Searches for the BASE URL. The code should work on both XML
          and HTML document even if base mechanisms are completely
          different. It returns the base as defined in RFC 2396
          sections 5.1.1. Base URI within Document Content and 5.1.2.
          Base URI from the Encapsulating Entity However it does not
           return the document base (5.1.3), use doc->URL in this case N)rr2r�)rr�r�r*rrr�nodeGetBaseQs
zxmlDoc.nodeGetBasecCs(|dkrd}n|j}tj|j||�}|S)z�Builds the string equivalent to the text contained in the
          Node list made of TEXTs and ENTITY_REFs, contrary to
          xmlNodeListGetString() this function doesn't do any
           character encoding handling. N)rr2r�)rr�r��list__or*rrr�nodeListGetRawString]s
zxmlDoc.nodeListGetRawStringcCs(|dkrd}n|j}tj|j||�}|S)zlBuild the string equivalent to the text contained in the
           Node list made of TEXTs and ENTITY_REFs N)rr2r�)rr�r�rXr*rrr�nodeListGetStringgs
zxmlDoc.nodeListGetStringcCs&|dkrd}n|j}tj|j|�}|S)a!This function checks that all the namespaces declared
          within the given tree are properly declared. This is needed
          for example after Copy or Cut and then paste operations.
          The subtree may still hold pointers to namespace
          declarations outside the subtree or invalid/masked. As much
          as possible the function try to reuse the existing
          namespaces found in the new environment. If not possible
          the new namespaces are redeclared on @tree at the top of
           the given subtree. N)rr2r�)r�tree�tree__or*rrrr�os

zxmlDoc.reconciliateNscCstj||j�}|S)z�Dump an XML document to a file. Will use compression if
          compiled in and enabled. If @filename is "-" the stdout
           file is used. )r2ZxmlSaveFiler)rr�r*rrr�saveFile~szxmlDoc.saveFilecCstj||j|�}|S)z:Dump an XML document, converting it to the given encoding )r2ZxmlSaveFileEncr)rr�rzr*rrr�saveFileEnc�szxmlDoc.saveFileEnccCs(|dkrd}n|j}tj||j|�}|S)z�Dump an XML document to an I/O buffer. Warning ! This call
          xmlOutputBufferClose() on buf which is not available after
           this call. N)rr2�
xmlSaveFileTo)rrrzrr*rrr�
saveFileTo�s
zxmlDoc.saveFileTocCstj||j|�}|S)adDump an XML document to a file. Will use compression if
          compiled in and enabled. If @filename is "-" the stdout
          file is used. If @format is set then the document will be
          indented on output. Note that @format = 1 provide node
          indenting only if xmlIndentTreeOutput = 1 or
           xmlKeepBlanksDefault(0) was called )r2ZxmlSaveFormatFiler)rr�r{r*rrr�saveFormatFile�szxmlDoc.saveFormatFilecCstj||j||�}|S)z*Dump an XML document to a file or an URL. )r2ZxmlSaveFormatFileEncr)rr�rzr{r*rrr�saveFormatFileEnc�szxmlDoc.saveFormatFileEnccCs*|dkrd}n|j}tj||j||�}|S)z�Dump an XML document to an I/O buffer. Warning ! This call
          xmlOutputBufferClose() on buf which is not available after
           this call. N)rr2�xmlSaveFormatFileTo)rrrzr{rr*rrr�saveFormatFileTo�s
zxmlDoc.saveFormatFileTocCsB|dkrd}n|j}tj|j||�}|dkr4td��t|d�}|S)a�Search a Ns registered under a given name space for a
          document. recurse on the parents until it finds the defined
          namespace or return None otherwise. @nameSpace can be None,
          this is a search for the default namespace. We don't allow
          to cross entities boundaries. If you don't declare the
          namespace within those you will be in troubles !!! A
           warning is generated to cover this case. NzxmlSearchNs() failed)r)rr2r�rr�)rr�r�r;r*r&rrrr��s
zxmlDoc.searchNscCsB|dkrd}n|j}tj|j||�}|dkr4td��t|d�}|S)z�Search a Ns aliasing a given URI. Recurse on the parents
          until it finds the defined namespace or return None
           otherwise. NzxmlSearchNsByHref() failed)r)rr2r�rr�)rr�r�r;r*r&rrrr��s
zxmlDoc.searchNsByHrefcCstj|j|�dS)zxset the compression ratio for a document, ZLIB based
           Correct values: 0 (uncompressed) to 9 (max compression) N)r2ZxmlSetDocCompressModer)rr�rrr�setDocCompressMode�szxmlDoc.setDocCompressModecCs&|dkrd}n|j}tj||j�dS)z<update all nodes in the list to point to the right document N)rr2r�)rr�rXrrrr��szxmlDoc.setListDoccCs<|dkrd}n|j}tj|j|�}|dkr.dSt|d�}|S)zvSet the root element of the document (doc->children is a
           list containing possibly comments, PIs, etc ...). N)r)rr2r�r�)r�rootZroot__or*r&rrr�setRootElement�s
zxmlDoc.setRootElementcCs&|dkrd}n|j}tj||j�dS)zJupdate all nodes under the tree to point to the right
           document N)rr2r�)rr[r\rrrr��szxmlDoc.setTreeDoccCs,tj|j|�}|dkrtd��t|d�}|S)z�Parse the value string and build the node list associated.
           Should produce a flat tree with only TEXTs and ENTITY_REFs. NzxmlStringGetNodeList() failed)r)r2ZxmlStringGetNodeListrrr�)rrr*r&rrr�stringGetNodeList�s

zxmlDoc.stringGetNodeListcCs.tj|j||�}|dkr td��t|d�}|S)z�Parse the value string and build the node list associated.
           Should produce a flat tree with only TEXTs and ENTITY_REFs. Nz xmlStringLenGetNodeList() failed)r)r2ZxmlStringLenGetNodeListrrr�)rrr)r*r&rrr�stringLenGetNodeList�s

zxmlDoc.stringLenGetNodeListcCs,tj|j|�}|dkrtd��t|d�}|S)z,Search the attribute declaring the given ID NzxmlGetID() failed)r)r2ZxmlGetIDrrri)rrZr*r&rrrrZ�s

z	xmlDoc.IDcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||�}|S)z�Determine whether an attribute is of type ID. In case we
          have DTD(s) then this is done if DTD loading has been
          requested. In the case of HTML documents parsed with the
           HTML parser, then ID detection is done systematically. N)rr2r�)rrPrxr�r�r*rrrr��szxmlDoc.isIDcCstj|j|�}|S)z�Search in the DtDs whether an element accept Mixed content
           (or ANY) basically if it is supposed to accept text childs )r2ZxmlIsMixedElementr)rrCr*rrr�isMixedElementszxmlDoc.isMixedElementcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||�}|S)z�Determine whether an attribute is of type Ref. In case we
          have DTD(s) then this is simple, otherwise we use an
           heuristic: name Ref (upper or lowercase). N)rr2r�)rrPrxr�r�r*rrrr�szxmlDoc.isRefcCs&|dkrd}n|j}tj|j|�}|S)zORemove the given attribute from the ID table maintained
           internally. N)rr2�xmlRemoveID)rrxr�r*rrr�removeIDs
zxmlDoc.removeIDcCs&|dkrd}n|j}tj|j|�}|S)zPRemove the given attribute from the Ref table maintained
           internally. N)rr2�xmlRemoveRef)rrxr�r*rrr�	removeRef!s
zxmlDoc.removeRefcCs@|dkrd}n|j}|dkr"d}n|j}tj||j|||�}|S)a�Does the validation related extra step of the normalization
          of attribute values:  If the declared value is not CDATA,
          then the XML processor must further process the normalized
          attribute value by discarding any leading and trailing
          space (#x20) characters, and by replacing sequences of
          space (#x20) characters by single space (#x20) character. 
          Also  check VC: Standalone Document Declaration in P32, and
           update ctxt->valid accordingly N)rr2�#xmlValidCtxtNormalizeAttributeValue)rr�rPrCrrer�r*rrr� validCtxtNormalizeAttributeValue)s	z'xmlDoc.validCtxtNormalizeAttributeValuecCs*|dkrd}n|j}tj|j|||�}|S)a�Does the validation related extra step of the normalization
          of attribute values:  If the declared value is not CDATA,
          then the XML processor must further process the normalized
          attribute value by discarding any leading and trailing
          space (#x20) characters, and by replacing sequences of
           space (#x20) characters by single space (#x20) character. N)rr2r�)rrPrCrr�r*rrrr�9s
z#xmlDoc.validNormalizeAttributeValuecCs&|dkrd}n|j}tj||j�}|S)z�Try to validate the document instance  basically it does
          the all the checks described by the XML Rec i.e. validates
          the internal and external subset (if present) and validate
           the document tree. N)rr2�xmlValidateDocument)rr�rer*rrr�validateDocumentEs
zxmlDoc.validateDocumentcCs&|dkrd}n|j}tj||j�}|S)aDoes the final step for the document validation once all
          the incremental validation steps have been completed 
          basically it does the following checks described by the XML
          Rec  Check all the IDREF/IDREFS attributes definition for
           validity N)rr2�xmlValidateDocumentFinal)rr�rer*rrr�validateDocumentFinalOs
zxmlDoc.validateDocumentFinalcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|�}|S)aTry to validate the document against the dtd instance 
          Basically it does check all the definitions in the DtD.
          Note the the internal subset (if present) is de-coupled
          (i.e. not used), which could give problems if ID or IDREF
           is present. N)rr2�xmlValidateDtd)rr�r�re�dtd__or*rrr�validateDtdZszxmlDoc.validateDtdcCs&|dkrd}n|j}tj||j�}|S)a�Does the final step for the dtds validation once all the
          subsets have been parsed  basically it does the following
          checks described by the XML Rec - check that ENTITY and
          ENTITIES type attributes default or possible values matches
          one of the defined entities. - check that NOTATION type
          attributes default or possible values matches one of the
           defined notations. N)rr2�xmlValidateDtdFinal)rr�rer*rrr�validateDtdFinalgs
zxmlDoc.validateDtdFinalcCs<|dkrd}n|j}|dkr"d}n|j}tj||j|�}|S)z-Try to validate the subtree under an element N)rr2�xmlValidateElement)rr�rPrer�r*rrr�validateElementtszxmlDoc.validateElementcCs(|dkrd}n|j}tj||j|�}|S)zbValidate that the given name match a notation declaration.
           - [ VC: Notation Declared ] N)rr2�xmlValidateNotationUse)rr�rSrer*rrr�validateNotationUse}s
zxmlDoc.validateNotationUsec	CsT|dkrd}n|j}|dkr"d}n|j}|dkr6d}n|j}tj||j|||�}|S)a�Try to validate a single attribute for an element basically
          it does the following checks as described by the XML-1.0
          recommendation: - [ VC: Attribute Value Type ] - [ VC:
          Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
          Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
          Name ] - [ VC: Notation Attributes ]  The ID/IDREF
           uniqueness and matching are done separately N)rr2�xmlValidateOneAttribute)	rr�rPrxrrer�r�r*rrr�validateOneAttribute�szxmlDoc.validateOneAttributecCs<|dkrd}n|j}|dkr"d}n|j}tj||j|�}|S)a]Try to validate a single element and it's attributes,
          basically it does the following checks as described by the
          XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
          Required Attribute ] Then call xmlValidateOneAttribute()
          for each attribute present.  The ID/IDREF checkings are
           done separately N)rr2�xmlValidateOneElement)rr�rPrer�r*rrr�validateOneElement�szxmlDoc.validateOneElementc
CsV|dkrd}n|j}|dkr"d}n|j}|dkr6d}n|j}tj||j||||�}	|	S)a�Try to validate a single namespace declaration for an
          element basically it does the following checks as described
          by the XML-1.0 recommendation: - [ VC: Attribute Value Type
          ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
          [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
          Entity Name ] - [ VC: Notation Attributes ]  The ID/IDREF
           uniqueness and matching are done separately N)rr2�xmlValidateOneNamespace)
rr�rPr~ryrrer�r�r*rrr�validateOneNamespace�szxmlDoc.validateOneNamespacecCs>|dkrd}n|j}|dkr"d}n|j}tj||j||�}|S)z/Pop the element end from the validation stack. N)rr2�xmlValidatePopElement)rr�rP�qnamerer�r*rrr�validatePopElement�szxmlDoc.validatePopElementcCs>|dkrd}n|j}|dkr"d}n|j}tj||j||�}|S)z2Push a new element start on the validation stack. N)rr2�xmlValidatePushElement)rr�rPr�rer�r*rrr�validatePushElement�szxmlDoc.validatePushElementcCs&|dkrd}n|j}tj||j�}|S)z�Try to validate a the root element basically it does the
          following check as described by the XML-1.0 recommendation:
          - [ VC: Root Element Type ] it doesn't try to recurse or
           apply other check to the element N)rr2�xmlValidateRoot)rr�rer*rrr�validateRoot�s
zxmlDoc.validateRootcCstj|j�}|S)z=Implement the XInclude substitution on the XML document @doc )r2ZxmlXIncludeProcessr)rr*rrr�xincludeProcess�szxmlDoc.xincludeProcesscCstj|j|�}|S)z=Implement the XInclude substitution on the XML document @doc )r2ZxmlXIncludeProcessFlagsr)rr�r*rrr�xincludeProcessFlags�szxmlDoc.xincludeProcessFlagscCs&|dkrd}n|j}tj||j�}|S)zuSetup an xmltextReader to parse a preparsed XML document.
           This reuses the existing @reader xmlTextReader. N)rr2�xmlReaderNewWalker)r�reader�	reader__or*rrr�	NewWalker�s
zxmlDoc.NewWalkercCs*tj|j�}|dkrtd��t|d�}|S)z2Create an xmltextReader for a preparsed document. NzxmlReaderWalker() failed)r)r2ZxmlReaderWalkerrrr�)rr*r&rrr�readerWalker�s

zxmlDoc.readerWalkercCs*tj|j�}|dkrtd��t|d�}|S)zCreate an XML Schemas parse context for that document. NB.
           The document may be modified during the parsing process. Nz"xmlSchemaNewDocParserCtxt() failed)r)r2ZxmlSchemaNewDocParserCtxtrrr�)rr*r&rrr�schemaNewDocParserCtxt�s

zxmlDoc.schemaNewDocParserCtxtcCs&|dkrd}n|j}tj||j�}|S)z$Validate a document tree in memory. N)rr2�xmlSchemaValidateDoc)rr�rer*rrr�schemaValidateDoc�s
zxmlDoc.schemaValidateDoccCs*tj|j�}|dkrtd��t|d�}|S)zCreate a new xmlXPathContext NzxmlXPathNewContext() failed)r)r2ZxmlXPathNewContextrrr	)rr*r&rrrr�	s

zxmlDoc.xpathNewContextcCstj|j�}|S)amCall this routine to speed up XPath computation on static
          documents. This stamps all the element nodes with the
          document order Like for line information, the order is kept
          in the element->content field, the value stored is actually
          - the node number (starting at -1) to be able to
           differentiate from line numbers. )r2ZxmlXPathOrderDocElemsr)rr*rrr�xpathOrderDocElemsszxmlDoc.xpathOrderDocElemscCsV|dkrd}n|j}|dkr"d}n|j}tj|j||�}|dkrHtd��t|d�}|S)zCreate a new XPointer context NzxmlXPtrNewContext() failed)r)rr2rrr	)r�herer
Zhere__orr*r&rrrrs
zxmlDoc.xpointerNewContext)N)nrrrrrwrrrrrrrrrrrrr r!r"r#r$r%r'r(r)r*r+r,r-r.r/r0r2r4r6r8r:r�r�r<r=r>r?r@rArBrCrDrErFrGrIrKrLrMrOrPrQrRrSrTrVrWrYrZr�r]r^r`rarbrdr�r�rer�rgr�rhrirZr�rjr�rlrnrpr�rrrtrwryr{r}rr�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrt{s�
				
	
			

	
	



				rtc@s�eZdZd�dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Z d>d?�Z!d@dA�Z"dBdC�Z#dDdE�Z$dFdG�Z%dHdI�Z&dJdK�Z'dLdM�Z(dNdO�Z)dPdQ�Z*dRdS�Z+dTdU�Z,dVdW�Z-dXdY�Z.dZd[�Z/d\d]�Z0d^d_�Z1d`da�Z2dbdc�Z3ddde�Z4dfdg�Z5dhdi�Z6djdk�Z7dldm�Z8dndo�Z9dpdq�Z:drds�Z;dtdu�Z<dvdw�Z=dxdy�Z>dzd{�Z?d|d}�Z@d~d�ZAd�d��ZBd�d��ZCd�d��ZDd�d��ZEd�d��ZFd�d��ZGd�d��ZHd�d��ZId�d��ZJd�d��ZKd�d��ZLd�d��ZMd�d��ZNd�d��ZOd�d��ZPd�d��ZQd�d��ZRd�d��ZSd�d��ZTd�d��ZUdS)�r�NcCs||_tj||d�dS)N)r)rr�r)rrrrrr*szparserCtxt.__init__cCs |jdkrtj|j�d|_dS)N)rr2r�)rrrrr5.s
zparserCtxt.__del__cCs*tj|j�}|dkrtd��t|d�}|S)z-Get the document tree from a parser context. NzxmlParserGetDoc() failed)r)r2ZxmlParserGetDocrrrt)rr*�_parserCtxt__tmprrrrs4s

zparserCtxt.doccCstj|j�}|S)z4Get the validity information from a parser context. )r2ZxmlParserGetIsValidr)rr*rrr�isValid;szparserCtxt.isValidcCstj|j|�dS)z<Switch on the generation of line number for elements nodes. N)r2ZxmlParserSetLineNumbersr)rZlinenumbersrrr�lineNumbers@szparserCtxt.lineNumberscCstj|j|�dS)z6Switch the parser to load the DTD without validating. N)r2ZxmlParserSetLoadSubsetr)rZ
loadsubsetrrr�
loadSubsetDszparserCtxt.loadSubsetcCstj|j|�dS)z"Switch the parser to be pedantic. N)r2ZxmlParserSetPedanticr)r�pedanticrrrr�HszparserCtxt.pedanticcCstj|j|�dS)z'Switch the parser to replace entities. N)r2ZxmlParserSetReplaceEntitiesr)r�replaceEntitiesrrrr�LszparserCtxt.replaceEntitiescCstj|j|�dS)z&Switch the parser to validation mode. N)r2ZxmlParserSetValidater)r�validaterrrr�PszparserCtxt.validatecCstj|j�}|S)z7Get the well formed information from a parser context. )r2ZxmlParserGetWellFormedr)rr*rrr�
wellFormedTszparserCtxt.wellFormedcCs2tj|j||||�}|dkr$td��t|d�}|S)zkparse an XML in-memory document and build a tree. This
           reuses the existing @ctxt parser context NzhtmlCtxtReadDoc() failed)r)r2�htmlCtxtReadDocrrrt)rr�r�rzr�r*r�rrrr�]s

zparserCtxt.htmlCtxtReadDoccCs2tj|j||||�}|dkr$td��t|d�}|S)zoparse an XML from a file descriptor and build a tree. This
           reuses the existing @ctxt parser context NzhtmlCtxtReadFd() failed)r)r2�htmlCtxtReadFdrrrt)rr�r�rzr�r*r�rrrr�es

zparserCtxt.htmlCtxtReadFdcCs0tj|j|||�}|dkr"td��t|d�}|S)zoparse an XML file from the filesystem or the network. This
           reuses the existing @ctxt parser context NzhtmlCtxtReadFile() failed)r)r2�htmlCtxtReadFilerrrt)rr�rzr�r*r�rrrr�ms

zparserCtxt.htmlCtxtReadFilecCs4tj|j|||||�}|dkr&td��t|d�}|S)zkparse an XML in-memory document and build a tree. This
           reuses the existing @ctxt parser context NzhtmlCtxtReadMemory() failed)r)r2�htmlCtxtReadMemoryrrrt)rr�r�r�rzr�r*r�rrrr�us

zparserCtxt.htmlCtxtReadMemorycCstj|j�dS)zReset a parser context N)r2�
htmlCtxtResetr)rrrrr�}szparserCtxt.htmlCtxtResetcCstj|j|�}|S)z*Applies the options to the parser context )r2�htmlCtxtUseOptionsr)rr�r*rrrr��szparserCtxt.htmlCtxtUseOptionscCstj|j�dS)zrFree all the memory used by a parser context. However the
           parsed document in ctxt->myDoc is not freed. N)r2�htmlFreeParserCtxtr)rrrrr��szparserCtxt.htmlFreeParserCtxtcCstj|j�}|S)zcparse Reference declarations  [66] CharRef ::= '&#' [0-9]+
           ';' | '&#x' [0-9a-fA-F]+ ';' )r2�htmlParseCharRefr)rr*rrrr��szparserCtxt.htmlParseCharRefcCstj|j|||�}|S)zParse a Chunk of memory )r2�htmlParseChunkr)rror��	terminater*rrrr��szparserCtxt.htmlParseChunkcCstj|j�}|S)zZparse an HTML document (and build a tree if using the
           standard SAX interface). )r2�htmlParseDocumentr)rr*rrrr��szparserCtxt.htmlParseDocumentcCstj|j�dS)z�parse an HTML element, this is highly recursive this is
          kept for compatibility with previous code versions  [39]
          element ::= EmptyElemTag | STag content ETag  [41]
           Attribute ::= Name Eq AttValue N)r2�htmlParseElementr)rrrrr��szparserCtxt.htmlParseElementcCstj|j�}|S)a�This function provides the current index of the parser
          relative to the start of the current entity. This function
          is computed in bytes from the beginning starting at zero
          and finishing at the size in byte of the file if parsing a
          file. The function is of constant cost if the input is
           UTF-8 but can be costly if run on non-UTF-8 input. )r2ZxmlByteConsumedr)rr*rrr�byteConsumed�szparserCtxt.byteConsumedcCstj|j�dS)zMClear (release owned resources) and reinitialize a parser
           context N)r2ZxmlClearParserCtxtr)rrrr�clearParserCtxt�szparserCtxt.clearParserCtxtcCs2tj|j||||�}|dkr$td��t|d�}|S)zkparse an XML in-memory document and build a tree. This
           reuses the existing @ctxt parser context NzxmlCtxtReadDoc() failed)r)r2ZxmlCtxtReadDocrrrt)rr�r�rzr�r*r�rrr�ctxtReadDoc�s

zparserCtxt.ctxtReadDoccCs2tj|j||||�}|dkr$td��t|d�}|S)z�parse an XML from a file descriptor and build a tree. This
          reuses the existing @ctxt parser context NOTE that the file
          descriptor will not be closed when the reader is closed or
           reset. NzxmlCtxtReadFd() failed)r)r2Z
xmlCtxtReadFdrrrt)rr�r�rzr�r*r�rrr�
ctxtReadFd�s

zparserCtxt.ctxtReadFdcCs0tj|j|||�}|dkr"td��t|d�}|S)zoparse an XML file from the filesystem or the network. This
           reuses the existing @ctxt parser context NzxmlCtxtReadFile() failed)r)r2ZxmlCtxtReadFilerrrt)rr�rzr�r*r�rrr�ctxtReadFile�s

zparserCtxt.ctxtReadFilecCs4tj|j|||||�}|dkr&td��t|d�}|S)zkparse an XML in-memory document and build a tree. This
           reuses the existing @ctxt parser context NzxmlCtxtReadMemory() failed)r)r2ZxmlCtxtReadMemoryrrrt)rr�r�r�rzr�r*r�rrr�ctxtReadMemory�s

zparserCtxt.ctxtReadMemorycCstj|j�dS)zReset a parser context N)r2ZxmlCtxtResetr)rrrr�	ctxtReset�szparserCtxt.ctxtResetcCstj|j||||�}|S)zReset a push parser context )r2ZxmlCtxtResetPushr)rror�r�rzr*rrr�
ctxtResetPush�szparserCtxt.ctxtResetPushcCstj|j|�}|S)z*Applies the options to the parser context )r2ZxmlCtxtUseOptionsr)rr�r*rrr�ctxtUseOptions�szparserCtxt.ctxtUseOptionscCstj|j�}|S)zInitialize a parser context )r2ZxmlInitParserCtxtr)rr*rrr�initParserCtxt�szparserCtxt.initParserCtxtcCstj|j|||�}|S)zParse a Chunk of memory )r2Z
xmlParseChunkr)rror�r�r*rrr�
parseChunk�szparserCtxt.parseChunkcCstj|j�}|S)z�parse an XML document (and build a tree if using the
          standard SAX interface).  [1] document ::= prolog element
           Misc*  [22] prolog ::= XMLDecl? Misc* (doctypedecl Misc*)? )r2ZxmlParseDocumentr)rr*rrr�
parseDocument�szparserCtxt.parseDocumentcCstj|j�}|S)z�parse a general parsed entity An external general parsed
          entity is well-formed if it matches the production labeled
           extParsedEnt.  [78] extParsedEnt ::= TextDecl? content )r2ZxmlParseExtParsedEntr)rr*rrr�parseExtParsedEnt�szparserCtxt.parseExtParsedEntcCstj|j||�dS)z�Setup the parser context to parse a new buffer; Clears any
          prior contents from the parser context. The buffer
          parameter must not be None, but the filename parameter can
           be N)r2ZxmlSetupParserForBufferr)rr�r�rrr�setupParserForBuffer�szparserCtxt.setupParserForBuffercCstj|j�dS)z!Blocks further parser processing N)r2Z
xmlStopParserr)rrrr�
stopParserszparserCtxt.stopParsercCstj|j|||||�}|S)z�This function is deprecated, we now always process entities
          content through xmlStringDecodeEntities  TODO: remove it in
          next major release.  [67] Reference ::= EntityRef | CharRef
            [69] PEReference ::= '%' Name ';' )r2ZxmlDecodeEntitiesr)rr)�whatr
�end2�end3r*rrr�decodeEntities
szparserCtxt.decodeEntitiescCs&|dkrd}n|j}tj|j|�dS)z�Default handling of defined entities, when should we define
          a new input stream ? When do we just handle that as a set
           of chars ?  OBSOLETE: to be removed at some point. N)rr2�xmlHandleEntity)rZentityZ	entity__orrr�handleEntityszparserCtxt.handleEntitycCstj|j�}|S)aCparse an XML namespace name.  TODO: this seems not in use
          anymore, the namespace handling is done on top of the SAX
          interfaces, i.e. not on raw input.  [NS 3] NCName ::=
          (Letter | '_') (NCNameChar)*  [NS 4] NCNameChar ::= Letter
           | Digit | '.' | '-' | '_' | CombiningChar | Extender )r2ZxmlNamespaceParseNCNamer)rr*rrr�namespaceParseNCNameszparserCtxt.namespaceParseNCNamecCstj|j�}|S)a!parse a namespace prefix declaration  TODO: this seems not
          in use anymore, the namespace handling is done on top of
          the SAX interfaces, i.e. not on raw input.  [NS 1] NSDef
          ::= PrefixDef Eq SystemLiteral  [NS 2] PrefixDef ::=
           'xmlns' (':' NCName)? )r2ZxmlNamespaceParseNSDefr)rr*rrr�namespaceParseNSDef&szparserCtxt.namespaceParseNSDefcCstj|j�dS)z"Skip to the next char input char. N)r2ZxmlNextCharr)rrrr�nextChar/szparserCtxt.nextCharcCstj|j�}|S)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. )r2ZxmlParseAttValuer)rr*rrr�
parseAttValue3szparserCtxt.parseAttValuecCstj|j�dS)z�: parse the Attribute list def for an element  [52]
          AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>'  [53]
           AttDef ::= S Name S AttType S DefaultDecl N)r2ZxmlParseAttributeListDeclr)rrrr�parseAttributeListDeclOsz!parserCtxt.parseAttributeListDeclcCstj|j�dS)z�Parse escaped pure raw content.  [18] CDSect ::= CDStart
          CData CDEnd  [19] CDStart ::= '<![CDATA['  [20] Data ::=
           (Char* - (Char* ']]>' Char*))  [21] CDEnd ::= ']]>' N)r2ZxmlParseCDSectr)rrrr�parseCDSectUszparserCtxt.parseCDSectcCstj|j|�dS)a�parse 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 "&gt;", and must, for
          compatibility, be escaped using "&gt;" 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)r2ZxmlParseCharDatar)rZcdatarrr�
parseCharData[szparserCtxt.parseCharDatacCstj|j�}|S)z�parse 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. )r2ZxmlParseCharRefr)rr*rrr�parseCharRefeszparserCtxt.parseCharRefcCstj|j�dS)z�Skip an XML (SGML) comment <!-- .... --> The spec says that
          "For compatibility, the string "--" (double-hyphen) must
          not occur within comments. "  [15] Comment ::= '<!--'
           ((Char - '-') | ('-' (Char - '-')))* '-->' N)r2ZxmlParseCommentr)rrrr�parseCommentmszparserCtxt.parseCommentcCstj|j�dS)zhParse a content:  [43] content ::= (element | CharData |
           Reference | CDSect | PI | Comment)* N)r2ZxmlParseContentr)rrrr�parseContenttszparserCtxt.parseContentcCstj|j�dS)a)parse a DOCTYPE declaration  [28] doctypedecl ::=
          '<!DOCTYPE' S Name (S ExternalID)? S? ('[' (markupdecl |
          PEReference | S)* ']' S?)? '>'  [ VC: Root Element Type ]
          The Name in the document type declaration must match the
           element type of the root element. N)r2ZxmlParseDocTypeDeclr)rrrr�parseDocTypeDeclyszparserCtxt.parseDocTypeDeclcCstj|j�dS)z�parse an XML element, this is highly recursive  [39]
          element ::= EmptyElemTag | STag content ETag  [ WFC:
          Element Type Match ] The Name in an element's end-tag must
           match the element type in the start-tag. N)r2ZxmlParseElementr)rrrr�parseElement�szparserCtxt.parseElementcCstj|j�}|S)z�parse an Element declaration.  [45] elementdecl ::=
          '<!ELEMENT' S Name S contentspec S? '>'  [ VC: Unique
          Element Type Declaration ] No element type may be declared
           more than once )r2ZxmlParseElementDeclr)rr*rrr�parseElementDecl�szparserCtxt.parseElementDeclcCstj|j�}|S)zYparse the XML encoding name  [81] EncName ::= [A-Za-z]
           ([A-Za-z0-9._] | '-')* )r2ZxmlParseEncNamer)rr*rrr�parseEncName�szparserCtxt.parseEncNamecCstj|j�}|S)z�parse the XML encoding declaration  [80] EncodingDecl ::= S
          'encoding' Eq ('"' EncName '"' |  "'" EncName "'")  this
           setups the conversion filters. )r2ZxmlParseEncodingDeclr)rr*rrr�parseEncodingDecl�szparserCtxt.parseEncodingDeclcCstj|j�dS)zrparse an end of tag  [42] ETag ::= '</' Name S? '>'  With
           namespace  [NS 9] ETag ::= '</' QName S? '>' N)r2ZxmlParseEndTagr)rrrr�parseEndTag�szparserCtxt.parseEndTagcCstj|j�dS)a�parse <!ENTITY declarations  [70] EntityDecl ::= GEDecl |
          PEDecl  [71] GEDecl ::= '<!ENTITY' S Name S EntityDef S?
          '>'  [72] PEDecl ::= '<!ENTITY' S '%' S Name S PEDef S? '>'
          [73] EntityDef ::= EntityValue | (ExternalID NDataDecl?) 
          [74] PEDef ::= EntityValue | ExternalID  [76] NDataDecl ::=
          S 'NDATA' S Name  [ VC: Notation Declared ] The Name must
           match the declared name of a notation. N)r2ZxmlParseEntityDeclr)rrrr�parseEntityDecl�szparserCtxt.parseEntityDeclcCs*tj|j�}|dkrtd��t|d�}|S)a�parse 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() failed)r)r2ZxmlParseEntityRefrrr�)rr*r�rrr�parseEntityRef�s

zparserCtxt.parseEntityRefcCstj|j||�dS)z�parse Markup declarations from an external subset  [30]
          extSubset ::= textDecl? extSubsetDecl  [31] extSubsetDecl
           ::= (markupdecl | conditionalSect | PEReference | S) * N)r2ZxmlParseExternalSubsetr)rr�rGrrr�parseExternalSubset�szparserCtxt.parseExternalSubsetcCstj|j�dS)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)r2ZxmlParseMarkupDeclr)rrrr�parseMarkupDecl�szparserCtxt.parseMarkupDeclcCstj|j�dS)zOparse an XML Misc* optional field.  [27] Misc ::= Comment |
           PI |  S N)r2ZxmlParseMiscr)rrrr�	parseMisc�szparserCtxt.parseMisccCstj|j�}|S)z�parse an XML name.  [4] NameChar ::= Letter | Digit | '.' |
          '-' | '_' | ':' | CombiningChar | Extender  [5] Name ::=
          (Letter | '_' | ':') (NameChar)*  [6] Names ::= Name (#x20
           Name)* )r2ZxmlParseNamer)rr*rrr�	parseName�szparserCtxt.parseNamecCstj|j�dS)avxmlParseNamespace: parse specific PI '<?namespace ...'
          constructs.  This is what the older xml-name Working Draft
          specified, a bunch of other stuff may still rely on it, so
          support is still here as if it was declared on the root of
          the Tree:-(  TODO: remove from library  To be removed at
           next drop of binary compatibility N)r2ZxmlParseNamespacer)rrrr�parseNamespace�szparserCtxt.parseNamespacecCstj|j�}|S)zhparse an XML Nmtoken.  [7] Nmtoken ::= (NameChar)+  [8]
           Nmtokens ::= Nmtoken (#x20 Nmtoken)* )r2ZxmlParseNmtokenr)rr*rrr�parseNmtoken�szparserCtxt.parseNmtokencCstj|j�dS)a;parse a notation declaration  [82] NotationDecl ::=
          '<!NOTATION' S Name S (ExternalID |  PublicID) S? '>' 
          Hence there is actually 3 choices: 'PUBLIC' S PubidLiteral
          'PUBLIC' S PubidLiteral S SystemLiteral and 'SYSTEM' S
           SystemLiteral  See the NOTE on xmlParseExternalID(). N)r2ZxmlParseNotationDeclr)rrrr�parseNotationDecl�szparserCtxt.parseNotationDeclcCstj|j�dS)a�parse 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)r2ZxmlParsePEReferencer)rrrr�parsePEReferenceszparserCtxt.parsePEReferencecCstj|j�dS)z�parse an XML Processing Instruction.  [16] PI ::= '<?'
          PITarget (S (Char* - (Char* '?>' Char*)))? '?>'  The
           processing is transfered to SAX once parsed. N)r2Z
xmlParsePIr)rrrr�parsePIszparserCtxt.parsePIcCstj|j�}|S)zbparse the name of a PI  [17] PITarget ::= Name - (('X' |
           'x') ('M' | 'm') ('L' | 'l')) )r2ZxmlParsePITargetr)rr*rrr�
parsePITargetszparserCtxt.parsePITargetcCstj|j�}|S)znparse an XML public literal  [12] PubidLiteral ::= '"'
           PubidChar* '"' | "'" (PubidChar - "'")* "'" )r2ZxmlParsePubidLiteralr)rr*rrr�parsePubidLiteralszparserCtxt.parsePubidLiteralcCstj|j�}|S)z�Parse and return a string between quotes or doublequotes 
          TODO: Deprecated, to  be removed at next drop of binary
           compatibility )r2ZxmlParseQuotedStringr)rr*rrr�parseQuotedString%szparserCtxt.parseQuotedStringcCstj|j�dS)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)r2ZxmlParseReferencer)rrrr�parseReference,szparserCtxt.parseReferencecCstj|j�}|S)a�parse the XML standalone declaration  [32] SDDecl ::= S
          'standalone' Eq (("'" ('yes' | 'no') "'") | ('"' ('yes' |
          'no')'"'))  [ VC: Standalone Document Declaration ] TODO
          The standalone document declaration must have the value
          "no" if any external markup declarations contain
          declarations of: - attributes with default values, if
          elements to which these attributes apply appear in the
          document without specifications of values for these
          attributes, or - entities (other than amp, lt, gt, apos,
          quot), if references to those entities appear in the
          document, or - attributes with values subject to
          normalization, where the attribute appears in the document
          with a value which will change as a result of
          normalization, or - element types with element content, if
          white space occurs directly within any instance of those
           types. )r2ZxmlParseSDDeclr)rr*rrr�parseSDDecl4szparserCtxt.parseSDDeclcCstj|j�}|S)a�parse 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? '/>' )r2ZxmlParseStartTagr)rr*rrr�
parseStartTagHszparserCtxt.parseStartTagcCstj|j�}|S)zZparse an XML Literal  [11] SystemLiteral ::= ('"' [^"]*
           '"') | ("'" [^']* "'") )r2ZxmlParseSystemLiteralr)rr*rrr�parseSystemLiteralVszparserCtxt.parseSystemLiteralcCstj|j�dS)z~parse an XML declaration header for external entities  [77]
           TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>' N)r2ZxmlParseTextDeclr)rrrr�
parseTextDecl\szparserCtxt.parseTextDeclcCstj|j�}|S)z�parse the XML version.  [24] VersionInfo ::= S 'version' Eq
           (' VersionNum ' | " VersionNum ")  [25] Eq ::= S? '=' S? )r2ZxmlParseVersionInfor)rr*rrr�parseVersionInfoaszparserCtxt.parseVersionInfocCstj|j�}|S)zwparse the XML version value.  [26] VersionNum ::= '1.'
           [0-9]+  In practice allow [0-9].[0-9]+ at that level )r2ZxmlParseVersionNumr)rr*rrr�parseVersionNumgszparserCtxt.parseVersionNumcCstj|j�dS)zoparse an XML declaration header  [23] XMLDecl ::= '<?xml'
           VersionInfo EncodingDecl? SDDecl? S? '?>' N)r2ZxmlParseXMLDeclr)rrrr�parseXMLDeclmszparserCtxt.parseXMLDeclcCstj|j�dS)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)r2ZxmlParserHandlePEReferencer)rrrr�parserHandlePEReferencersz"parserCtxt.parserHandlePEReferencecCstj|j�dS)aTODO: Remove, now deprecated ... the test is done directly
          in the content parsing routines.  [67] Reference ::=
          EntityRef | CharRef  [68] EntityRef ::= '&' Name ';'  [
          WFC: Entity Declared ] the Name given in the entity
          reference must match that in an entity declaration, except
          that well-formed documents need not declare any of the
          following entities: amp, lt, gt, apos, quot.  [ WFC: Parsed
          Entity ] An entity reference must not contain the name of
          an unparsed entity  [66] CharRef ::= '&#' [0-9]+ ';' |
          '&#x' [0-9a-fA-F]+ ';'  A PEReference may have been
          detected in the current input stream the handling is done
           accordingly to http://www.w3.org/TR/REC-xml#entproc N)r2ZxmlParserHandleReferencer)rrrr�parserHandleReference�s
z parserCtxt.parserHandleReferencecCstj|j�}|S)zqxmlPopInput: the current input pointed by ctxt->input came
           to an end pop it and return the next char. )r2ZxmlPopInputr)rr*rrr�popInput�szparserCtxt.popInputcCstj|j�}|S)a�Trickery: 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)* )r2ZxmlScanNamer)rr*rrr�scanName�szparserCtxt.scanNamecCstj|j�}|S)z�skip all blanks character found at that point in the input
          streams. It pops up finished entities in the process if
           allowable at that point. )r2ZxmlSkipBlankCharsr)rr*rrr�skipBlankChars�szparserCtxt.skipBlankCharscCstj|j|||||�}|S)z�Takes a entity string content and process to do the
          adequate substitutions.  [67] Reference ::= EntityRef |
           CharRef  [69] PEReference ::= '%' Name ';' )r2ZxmlStringDecodeEntitiesr)rr.r�r
r�r�r*rrr�stringDecodeEntities�szparserCtxt.stringDecodeEntitiescCstj|j||||||�}|S)z�Takes a entity string content and process to do the
          adequate substitutions.  [67] Reference ::= EntityRef |
           CharRef  [69] PEReference ::= '%' Name ';' )r2ZxmlStringLenDecodeEntitiesr)rr.r)r�r
r�r�r*rrr�stringLenDecodeEntities�sz"parserCtxt.stringLenDecodeEntities)N)Vrrrrr5rsr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�)s�
	

		

	r�c@sfeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)riNcCs,t|�dkrtd��||_tj||d�dS)Nrz'xmlAttr got a wrong wrapper object type)r)rrurr�r)rrrrrr�szxmlAttr.__init__cCsd|jtt|��fS)Nz<xmlAttr (%s) object at 0x%x>)rCrvr)rrrrrw�szxmlAttr.__repr__cCstj||j|�dS)z*Dumps debug information for the attribute N)r2ZxmlDebugDumpAttrr)rrr{rrr�
debugDumpAttr�szxmlAttr.debugDumpAttrcCstj||j|�dS)z/Dumps debug information for the attribute list N)r2ZxmlDebugDumpAttrListr)rrr{rrr�debugDumpAttrList�szxmlAttr.debugDumpAttrListcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)zDo a copy of the attribute. NzxmlCopyProp() failed)r)rr2r�rri)rrF�	target__or*�
_xmlAttr__tmprrrr��s
zxmlAttr.copyPropcCs@|dkrd}n|j}tj||j�}|dkr2td��t|d�}|S)z Do a copy of an attribute list. NzxmlCopyPropList() failed)r)rr2r�rri)rrFr�r*r�rrrr��s
zxmlAttr.copyPropListcCstj|j�dS)z1Free one attribute, all the content is freed too N)r2ZxmlFreePropr)rrrr�freeProp�szxmlAttr.freePropcCstj|j�dS)zQFree a property and all its siblings, all the children are
           freed too. N)r2ZxmlFreePropListr)rrrr�freePropList�szxmlAttr.freePropListcCstj|j�}|S)z�Unlink and free one attribute, all the content is freed too
           Note this doesn't work for namespace definition attributes )r2Z
xmlRemovePropr)rr*rrr�
removeProp�szxmlAttr.removePropcCs&|dkrd}n|j}tj||j�}|S)zORemove the given attribute from the ID table maintained
           internally. N)rr2rk)rrsr�r*rrrrl�s
zxmlAttr.removeIDcCs&|dkrd}n|j}tj||j�}|S)zPRemove the given attribute from the Ref table maintained
           internally. N)rr2rm)rrsr�r*rrrrns
zxmlAttr.removeRef)N)rrrrrwr�r�r�r�r�r�r�rlrnrrrrri�s
		
ric@seZdZddd�Zdd�ZdS)r�NcCs,t|�dkrtd��||_tj||d�dS)Nrz,xmlAttribute got a wrong wrapper object type)r)rrurr�r)rrrrrrszxmlAttribute.__init__cCsd|jtt|��fS)Nz"<xmlAttribute (%s) object at 0x%x>)rCrvr)rrrrrwszxmlAttribute.__repr__)N)rrrrrwrrrrr�
s
r�c@sfeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)r	NcCs|dkr||_dSd|_dS)N)r)rrrrrrszcatalog.__init__cCs |jdkrtj|j�d|_dS)N)rr2ZxmlFreeCatalog)rrrrr5s
zcatalog.__del__cCstj|j|||�}|S)zYAdd an entry in the catalog, it may overwrite existing but
           different entries. )r2ZxmlACatalogAddr)rr
r�r�r*rrr�add!szcatalog.addcCstj|j�}|S)zCheck is a catalog is empty )r2ZxmlCatalogIsEmptyr)rr*rrr�catalogIsEmpty'szcatalog.catalogIsEmptycCstj|j�}|S)z1Convert all the SGML catalog entries as XML ones )r2ZxmlConvertSGMLCatalogr)rr*rrr�convertSGMLCatalog,szcatalog.convertSGMLCatalogcCstj|j|�dS)z*Dump the given catalog to the given file. N)r2ZxmlACatalogDumpr)rr�rrrr>1szcatalog.dumpcCstj|j|�}|S)z!Remove an entry from the catalog )r2ZxmlACatalogRemover)rrr*rrr�remove5szcatalog.removecCstj|j||�}|S)z:Do a complete resolution lookup of an External Identifier )r2ZxmlACatalogResolver)rr�r�r*rrr�resolve:szcatalog.resolvecCstj|j|�}|S)z_Try to lookup the catalog local reference associated to a
           public ID in that catalog )r2ZxmlACatalogResolvePublicr)rr�r*rrr�
resolvePublic?szcatalog.resolvePubliccCstj|j|�}|S)z3Try to lookup the catalog resource for a system ID )r2ZxmlACatalogResolveSystemr)rr�r*rrr�
resolveSystemEszcatalog.resolveSystemcCstj|j|�}|S)z*Do a complete resolution lookup of an URI )r2ZxmlACatalogResolveURIr)rr�r*rrr�
resolveURIJszcatalog.resolveURI)N)rrrrr5r�r�r�r>r�r�r�r�r�rrrrr	s
	r	c@sVeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)r�NcCs,t|�dkrtd��||_tj||d�dS)Nrz&xmlDtd got a wrong wrapper object type)r)rrurr�r)rrrrrrPszxmlDtd.__init__cCsd|jtt|��fS)Nz<xmlDtd (%s) object at 0x%x>)rCrvr)rrrrrwUszxmlDtd.__repr__cCstj||j�dS)z$Dumps debug information for the DTD N)r2ZxmlDebugDumpDTDr)rrrrr�debugDumpDTD\szxmlDtd.debugDumpDTDcCs*tj|j�}|dkrtd��t|d�}|S)zDo a copy of the dtd. NzxmlCopyDtd() failed)r)r2Z
xmlCopyDtdrrr�)rr*�_xmlDtd__tmprrr�copyDtdds

zxmlDtd.copyDtdcCstj|j�dS)zFree a DTD structure. N)r2Z
xmlFreeDtdr)rrrr�freeDtdkszxmlDtd.freeDtdcCs.tj|j||�}|dkr td��t|d�}|S)zQSearch the DTD for the description of this attribute on
           this element. NzxmlGetDtdAttrDesc() failed)r)r2ZxmlGetDtdAttrDescrrr�)rrPrCr*r�rrr�dtdAttrDescss

zxmlDtd.dtdAttrDesccCs,tj|j|�}|dkrtd��t|d�}|S)z3Search the DTD for the description of this element NzxmlGetDtdElementDesc() failed)r)r2ZxmlGetDtdElementDescrrr�)rrCr*r�rrr�dtdElementDesc{s

zxmlDtd.dtdElementDesccCs0tj|j|||�}|dkr"td��t|d�}|S)z[Search the DTD for the description of this qualified
           attribute on this element. NzxmlGetDtdQAttrDesc() failed)r)r2ZxmlGetDtdQAttrDescrrr�)rrPrCr~r*r�rrr�dtdQAttrDesc�s

zxmlDtd.dtdQAttrDesccCs.tj|j||�}|dkr td��t|d�}|S)z3Search the DTD for the description of this element NzxmlGetDtdQElementDesc() failed)r)r2ZxmlGetDtdQElementDescrrr�)rrCr~r*r�rrr�dtdQElementDesc�s

zxmlDtd.dtdQElementDesc)N)rrrrrwr�r�r�rrrrrrrrr�Os
r�c@seZdZddd�Zdd�ZdS)r�NcCs,t|�dkrtd��||_tj||d�dS)Nrz*xmlElement got a wrong wrapper object type)r)rrurr�r)rrrrrr�szxmlElement.__init__cCsd|jtt|��fS)Nz <xmlElement (%s) object at 0x%x>)rCrvr)rrrrrw�szxmlElement.__repr__)N)rrrrrwrrrrr��s
r�c@s&eZdZddd�Zdd�Zdd�ZdS)	r�NcCs,t|�dkrtd��||_tj||d�dS)Nrz)xmlEntity got a wrong wrapper object type)r)rrurr�r)rrrrrr�szxmlEntity.__init__cCsd|jtt|��fS)Nz<xmlEntity (%s) object at 0x%x>)rCrvr)rrrrrw�szxmlEntity.__repr__cCs&|dkrd}n|j}tj||j�dS)z�Default handling of defined entities, when should we define
          a new input stream ? When do we just handle that as a set
           of chars ?  OBSOLETE: to be removed at some point. N)rr2r�)rr�rerrrr��szxmlEntity.handleEntity)N)rrrrrwr�rrrrr��s
r�c@sVeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)r�NcCs|dkr||_dSd|_dS)N)r)rrrrrr�szError.__init__cCstj|j�}|S)z'The error code, e.g. an xmlParserError )r2ZxmlErrorGetCoder)rr*rrrr��sz
Error.codecCstj|j�}|S)z+What part of the library raised this error )r2ZxmlErrorGetDomainr)rr*rrr�domain�szError.domaincCstj|j�}|S)z
the filename )r2ZxmlErrorGetFiler)rr*rrrr8�sz
Error.filecCstj|j�}|S)zhow consequent is the error )r2ZxmlErrorGetLevelr)rr*rrrr�szError.levelcCstj|j�}|S)zthe line number if available )r2ZxmlErrorGetLiner)rr*rrr�line�sz
Error.linecCstj|j�}|S)z)human-readable informative error message )r2ZxmlErrorGetMessager)rr*rrr�message�sz
Error.messagecCs&|dkrd}n|j}tj|j|�}|S)z*Save the original error to the new place. N)rr2ZxmlCopyError)rZtoZto__or*rrr�	copyError�s
zError.copyErrorcCstj|j�dS)zCleanup the error. N)r2Z
xmlResetErrorr)rrrr�
resetError�szError.resetError)N)rrrrr�rr8rrrrrrrrrr��s
	r�c@s�eZdZd&dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�ZdS)'r�NcCs,t|�dkrtd��||_tj||d�dS)Nrz%xmlNs got a wrong wrapper object type)r)rrurr�r)rrrrrr�szxmlNs.__init__cCsd|jtt|��fS)Nz<xmlNs (%s) object at 0x%x>)rCrvr)rrrrrw�szxmlNs.__repr__cCs*tj|j�}|dkrtd��t|d�}|S)zDo a copy of the namespace. NzxmlCopyNamespace() failed)r)r2ZxmlCopyNamespacerrr�)rr*�_xmlNs__tmprrr�
copyNamespace�s

zxmlNs.copyNamespacecCs*tj|j�}|dkrtd��t|d�}|S)z Do a copy of an namespace list. NzxmlCopyNamespaceList() failed)r)r2ZxmlCopyNamespaceListrrr�)rr*r	rrr�copyNamespaceList�s

zxmlNs.copyNamespaceListcCstj|j�dS)z1Free up the structures associated to a namespace N)r2Z	xmlFreeNsr)rrrr�freeNs�szxmlNs.freeNscCstj|j�dS)zLFree up all the structures associated to the chained
           namespaces. N)r2Z
xmlFreeNsListr)rrrr�
freeNsListszxmlNs.freeNsListcCsD|dkrd}n|j}tj||j||�}|dkr6td��t|d�}|S)aQCreation of a new child element, added at the end of
          @parent children list. @ns and @content parameters are
          optional (None). If @ns is None, the newly created element
          inherits the namespace of @parent. If @content is non None,
          a child list containing the TEXTs and ENTITY_REFs node will
          be created. NOTE: @content is supposed to be a piece of XML
          CDATA, so it allows entity references. XML special chars
          must be escaped first by using
          xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should
           be used. NzxmlNewChild() failed)r)rr2r�rr�)rr_rCrH�	parent__or*r	rrrr�s
zxmlNs.newChildcCsD|dkrd}n|j}tj||j||�}|dkr6td��t|d�}|S)atCreation of a new node element within a document. @ns and
          @content are optional (None). NOTE: @content is supposed to
          be a piece of XML CDATA, so it allow entities references,
          but XML special chars need to be escaped first by using
          xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
           don't need entities support. NzxmlNewDocNode() failed)r)rr2rHrr�)rrsrCrHr�r*r	rrrrIs
zxmlNs.newDocNodecCsD|dkrd}n|j}tj||j||�}|dkr6td��t|d�}|S)atCreation of a new node element within a document. @ns and
          @content are optional (None). NOTE: @content is supposed to
          be a piece of XML CDATA, so it allow entities references,
          but XML special chars need to be escaped first by using
          xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you
           don't need entities support. NzxmlNewDocNodeEatName() failed)r)rr2rJrr�)rrsrCrHr�r*r	rrrrK&s
zxmlNs.newDocNodeEatNamecCsD|dkrd}n|j}tj||j||�}|dkr6td��t|d�}|S)zcCreation of a new node element within a document. @ns and
           @content are optional (None). NzxmlNewDocRawNode() failed)r)rr2rNrr�)rrsrCrHr�r*r	rrrrO4s
zxmlNs.newDocRawNodecCs,tj|j|�}|dkrtd��t|d�}|S)z8Creation of a new node element. @ns is optional (None). NzxmlNewNodeEatName() failed)r)r2ZxmlNewNodeEatNamerrr�)rrCr*r	rrr�newNodeEatName>s

zxmlNs.newNodeEatNamecCsD|dkrd}n|j}tj||j||�}|dkr6td��t|d�}|S)zPCreate a new property tagged with a namespace and carried
           by a node. NzxmlNewNsProp() failed)r)rr2r�rri)rr�rCrr;r*r	rrrr�Es
zxmlNs.newNsPropcCsD|dkrd}n|j}tj||j||�}|dkr6td��t|d�}|S)zPCreate a new property tagged with a namespace and carried
           by a node. NzxmlNewNsPropEatName() failed)r)rr2r�rri)rr�rCrr;r*r	rrrr�Os
zxmlNs.newNsPropEatNamecCsD|dkrd}n|j}tj||j||�}|dkr6td��t|d�}|S)a�Creation of a new child element, added at the end of
          @parent children list. @ns and @content parameters are
          optional (None). If @ns is None, the newly created element
          inherits the namespace of @parent. If @content is non None,
          a child TEXT node will be created containing the string
          @content. NOTE: Use xmlNewChild() if @content will contain
          entities that need to be preserved. Use this function,
          xmlNewTextChild(), if you need to ensure that reserved XML
          chars that might appear in @content, such as the ampersand,
          greater-than or less-than signs, are automatically replaced
           by their XML escaped entity representations. NzxmlNewTextChild() failed)r)rr2r�rr�)rr_rCrHrr*r	rrrr�Ys
zxmlNs.newTextChildcCs&|dkrd}n|j}tj||j�dS)z/Associate a namespace to a node, a posteriori. N)rr2r�)rr�r;rrrr�lszxmlNs.setNscCsD|dkrd}n|j}tj||j||�}|dkr6td��t|d�}|S)zqSet (or reset) an attribute carried by a node. The ns
           structure must be in scope, this is not checked NzxmlSetNsProp() failed)r)rr2r�rri)rr�rCrr;r*r	rrrr�rs
zxmlNs.setNsPropcCs(|dkrd}n|j}tj||j|�}|S)z'Remove an attribute carried by a node. N)rr2r�)rr�rCr;r*rrrr�|s
zxmlNs.unsetNsPropcCstj|j�dS)z�Namespace nodes in libxml don't match the XPath semantic.
          In a node set the namespace nodes are duplicated and the
          next pointer is set to the parent node in the XPath
           semantic. Check if such a node needs to be freed N)r2ZxmlXPathNodeSetFreeNsr)rrrr�xpathNodeSetFreeNs�szxmlNs.xpathNodeSetFreeNs)N)rrrrrwr
rrr
r�rIrKrOrr�r�r�r�r�r�rrrrrr��s$




r�c@sfeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)rmNcCs||_tj||d�dS)N)r)rr7r)rrrrrr�szoutputBuffer.__init__cCs*|dkrd}n|j}tj|j|||�dS)zDump an HTML document. N)rr2r)rr�rzr{r�rrrr�sz+outputBuffer.htmlDocContentDumpFormatOutputcCs(|dkrd}n|j}tj|j||�dS)z:Dump an HTML document. Formating return/spaces are added. N)rr2r)rr�rzr�rrrr�sz%outputBuffer.htmlDocContentDumpOutputcCs@|dkrd}n|j}|dkr"d}n|j}tj|j||||�dS)zLDump an HTML node, recursive behaviour,children are printed
           too. N)rr2r)rrsr�rzr{r�r�rrrr�sz%outputBuffer.htmlNodeDumpFormatOutputcCs>|dkrd}n|j}|dkr"d}n|j}tj|j|||�dS)zuDump an HTML node, recursive behaviour,children are printed
           too, and formatting returns/spaces are added. N)rr2r)rrsr�rzr�r�rrrr�szoutputBuffer.htmlNodeDumpOutputcCsB|dkrd}n|j}|dkr"d}n|j}tj|j|||||�dS)z�Dump an XML node, recursive behaviour, children are printed
          too. Note that @format = 1 provide node indenting only if
          xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was
           called N)rr2rU)rrsr�rr{rzr�r�rrrrV�szoutputBuffer.nodeDumpOutputcCs(|dkrd}n|j}tj|j||�}|S)z�Dump an XML document to an I/O buffer. Warning ! This call
          xmlOutputBufferClose() on buf which is not available after
           this call. N)rr2r_)rr�rzr�r*rrrr`�s
zoutputBuffer.saveFileTocCs*|dkrd}n|j}tj|j|||�}|S)z�Dump an XML document to an I/O buffer. Warning ! This call
          xmlOutputBufferClose() on buf which is not available after
           this call. N)rr2rc)rr�rzr{r�r*rrrrd�s
zoutputBuffer.saveFormatFileTocCstj|j�}|S)zKGives a pointer to the data currently held in the output
           buffer )r2ZxmlOutputBufferGetContentr)rr*rrrr��szoutputBuffer.getContentcCstj|j||�}|S)z�Write the content of the array in the output I/O buffer
          This routine handle the I18N transcoding from internal
          UTF-8 The buffer is lossless, i.e. will store in case of
           partial or delayed writes. )r2ZxmlOutputBufferWriter)rr)rr*rrrr-�szoutputBuffer.writecCstj|j|�}|S)z�Write the content of the string in the output I/O buffer
          This routine handle the I18N transcoding from internal
          UTF-8 The buffer is lossless, i.e. will store in case of
           partial or delayed writes. )r2ZxmlOutputBufferWriteStringr)rr.r*rrr�writeString�szoutputBuffer.writeString)N)rrrrrrrrrVr`rdr�r-rrrrrrm�s
	
	
rmc@sFeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dS)rkNcCs||_tj||d�dS)N)r)rr0r)rrrrrr�szinputBuffer.__init__cCs |jdkrtj|j�d|_dS)N)rr2r6)rrrrr5�s
zinputBuffer.__del__cCstj|j|�}|S)aYGrow up the content of the input buffer, the old data are
          preserved This routine handle the I18N transcoding to
          internal UTF-8 This routine is used when operating the
          parser in normal (pull) mode  TODO: one should be able to
          remove one extra copy by copying directly onto in->buffer
           or in->raw )r2ZxmlParserInputBufferGrowr)rr)r*rrr�grow�szinputBuffer.growcCstj|j||�}|S)z�Push the content of the arry in the input buffer This
          routine handle the I18N transcoding to internal UTF-8 This
          is used when operating the parser in progressive (push)
           mode. )r2ZxmlParserInputBufferPushr)rr)rr*rrr�pushszinputBuffer.pushcCstj|j|�}|S)z�Refresh the content of the input buffer, the old data are
          considered consumed This routine handle the I18N
           transcoding to internal UTF-8 )r2ZxmlParserInputBufferReadr)rr)r*rrrr%szinputBuffer.readcCs,|dkrd}n|j}tj||j|||�}|S)z%Setup an XML reader with new options N)rr2�xmlTextReaderSetup)rr�r�rzr�r�r*rrr�Setups
zinputBuffer.SetupcCs2tj|j|�}|dkrtd��t|d�}||_|S)z2Create an xmlTextReader structure fed with @input NzxmlNewTextReader() failed)r)r2ZxmlNewTextReaderrrr�r�)rr�r*Z_inputBuffer__tmprrr�
newTextReader"s
zinputBuffer.newTextReader)N)
rrrrr5rrr%rrrrrrrk�s
	
rkc@s6eZdZddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
r�NcCs|dkr||_dSd|_dS)N)r)rrrrrr+szxmlReg.__init__cCs |jdkrtj|j�d|_dS)N)rr2ZxmlRegFreeRegexp)rrrrr5/s
zxmlReg.__del__cCstj|j|�}|S)z4Check if the regular expression generates the value )r2Z
xmlRegexpExecr)rrHr*rrr�
regexpExec8szxmlReg.regexpExeccCstj|j�}|S)z/Check if the regular expression is determinist )r2ZxmlRegexpIsDeterministr)rr*rrr�regexpIsDeterminist=szxmlReg.regexpIsDeterministcCstj||j�dS)z5Print the content of the compiled regular expression N)r2ZxmlRegexpPrintr)rrrrr�regexpPrintBszxmlReg.regexpPrint)N)rrrrr5rrrrrrrr�*s

	r�c@s.eZdZd
dd�Zdd�Zdd�Zdd	�ZdS)r{NcCs|dkr||_dSd|_dS)N)r)rrrrrrGszrelaxNgParserCtxt.__init__cCs |jdkrtj|j�d|_dS)N)rr2ZxmlRelaxNGFreeParserCtxt)rrrrr5Ks
zrelaxNgParserCtxt.__del__cCs*tj|j�}|dkrtd��t|d�}|S)z�parse a schema definition resource and build an internal
           XML Shema struture which can be used to validate instances. NzxmlRelaxNGParse() failed)r)r2ZxmlRelaxNGParserr�
relaxNgSchema)rr*Z_relaxNgParserCtxt__tmprrr�relaxNGParseTs

zrelaxNgParserCtxt.relaxNGParsecCstj|j|�}|S)z�Semi private function used to pass informations to a parser
           context which are a combination of xmlRelaxNGParserFlag . )r2ZxmlRelaxParserSetFlagr)rr�r*rrr�relaxParserSetFlag\sz$relaxNgParserCtxt.relaxParserSetFlag)N)rrrrr5rrrrrrr{Fs
	r{c@s>eZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�ZdS)rNcCs|dkr||_dSd|_dS)N)r)rrrrrrcszrelaxNgSchema.__init__cCs |jdkrtj|j�d|_dS)N)rr2ZxmlRelaxNGFree)rrrrr5gs
zrelaxNgSchema.__del__cCstj||j�dS)zDump a RelaxNG structure back N)r2ZxmlRelaxNGDumpr)rrrrr�relaxNGDumppszrelaxNgSchema.relaxNGDumpcCstj||j�dS)z#Dump the transformed RelaxNG tree. N)r2ZxmlRelaxNGDumpTreer)rrrrr�relaxNGDumpTreetszrelaxNgSchema.relaxNGDumpTreecCs0tj|j�}|dkrtd��t|d�}||_|S)zOCreate an XML RelaxNGs validation context based on the
           given schema NzxmlRelaxNGNewValidCtxt() failed)r)r2ZxmlRelaxNGNewValidCtxtrr�relaxNgValidCtxt�schema)rr*Z_relaxNgSchema__tmprrr�relaxNGNewValidCtxtxs
z!relaxNgSchema.relaxNGNewValidCtxtcCs&|dkrd}n|j}tj||j�}|S)a7Use 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 desactivated. @
          The @schema should not be freed until the reader is
           deallocated or its use has been deactivated. N)rr2�xmlTextReaderRelaxNGSetSchema)rr�r�r*rrr�RelaxNGSetSchema�s
zrelaxNgSchema.RelaxNGSetSchema)N)	rrrrr5rrr!r#rrrrrbs
	
rc@sNeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dS)rNcCsd|_||_tj||d�dS)N)r)r rr�r)rrrrrr�szrelaxNgValidCtxt.__init__cCs |jdkrtj|j�d|_dS)N)rr2ZxmlRelaxNGFreeValidCtxt)rrrrr5�s
zrelaxNgValidCtxt.__del__cCs&|dkrd}n|j}tj|j|�}|S)z$Validate a document tree in memory. N)rr2r1)rrsr�r*rrrr2�s
z#relaxNgValidCtxt.relaxNGValidateDoccCs<|dkrd}n|j}|dkr"d}n|j}tj|j||�}|S)z�Validate a full subtree when
          xmlRelaxNGValidatePushElement() returned 0 and the content
           of the node has been expanded. N)rr2r3)rrsrPr�r�r*rrrr4�sz+relaxNgValidCtxt.relaxNGValidateFullElementcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||�}|S)z7Pop the element end from the RelaxNG validation stack. N)rr2r5)rrsrPr�r�r*rrrr6�sz*relaxNgValidCtxt.relaxNGValidatePopElementcCstj|j||�}|S)z;check the CData parsed for validation in the current stack )r2ZxmlRelaxNGValidatePushCDatar)rr@r)r*rrr�relaxNGValidatePushCData�sz)relaxNgValidCtxt.relaxNGValidatePushCDatacCs<|dkrd}n|j}|dkr"d}n|j}tj|j||�}|S)z:Push a new element start on the RelaxNG validation stack. N)rr2r7)rrsrPr�r�r*rrrr8�sz+relaxNgValidCtxt.relaxNGValidatePushElementcCs(|dkrd}n|j}tj||j|�}|S)z�Use RelaxNG schema context to validate the document as it
          is processed. Activation is only possible before the first
          Read(). If @ctxt is None, then RelaxNG schema validation is
           deactivated. N)rr2� xmlTextReaderRelaxNGValidateCtxt)rr�r�r�r*rrr�RelaxNGValidateCtxt�s
z$relaxNgValidCtxt.RelaxNGValidateCtxt)N)rrrrr5r2r4r6r$r8r&rrrrr�s
		
rc@s&eZdZddd�Zdd�Zdd�ZdS)	r�NcCs|dkr||_dSd|_dS)N)r)rrrrrr�szSchemaParserCtxt.__init__cCs |jdkrtj|j�d|_dS)N)rr2ZxmlSchemaFreeParserCtxt)rrrrr5�s
zSchemaParserCtxt.__del__cCs*tj|j�}|dkrtd��t|d�}|S)z�parse a schema definition resource and build an internal
           XML Shema struture which can be used to validate instances. NzxmlSchemaParse() failed)r)r2ZxmlSchemaParserr�Schema)rr*Z_SchemaParserCtxt__tmprrr�schemaParse�s

zSchemaParserCtxt.schemaParse)N)rrrrr5r(rrrrr��s
	r�c@s6eZdZddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
r'NcCs|dkr||_dSd|_dS)N)r)rrrrrr�szSchema.__init__cCs |jdkrtj|j�d|_dS)N)rr2Z
xmlSchemaFree)rrrrr5�s
zSchema.__del__cCs&|dkrd}n|j}tj||j�}|S)a9Use 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 desactivated. @
          The @schema should not be freed until the reader is
           deallocated or its use has been deactivated. N)rr2�xmlTextReaderSetSchema)rr�r�r*rrr�	SetSchema�s
zSchema.SetSchemacCstj||j�dS)zDump a Schema structure. N)r2Z
xmlSchemaDumpr)rrrrr�
schemaDump	szSchema.schemaDumpcCs0tj|j�}|dkrtd��t|d�}||_|S)zOCreate an XML Schemas validation context based on the given
           schema. NzxmlSchemaNewValidCtxt() failed)r)r2ZxmlSchemaNewValidCtxtrr�SchemaValidCtxtr )rr*Z_Schema__tmprrr�schemaNewValidCtxt
s
zSchema.schemaNewValidCtxt)N)rrrrr5r*r+r-rrrrr'�s

	r'c@sfeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)r,NcCsd|_||_tj||d�dS)N)r)r rr�r)rrrrrrszSchemaValidCtxt.__init__cCs |jdkrtj|j�d|_dS)N)rr2ZxmlSchemaFreeValidCtxt)rrrrr5s
zSchemaValidCtxt.__del__cCs(|dkrd}n|j}tj||j|�}|S)z�Use W3C XSD schema context to validate the document as it
          is processed. Activation is only possible before the first
          Read(). If @ctxt is None, then XML Schema validation is
           deactivated. N)rr2�xmlTextReaderSchemaValidateCtxt)rr�r�r�r*rrr�SchemaValidateCtxt%s
z"SchemaValidCtxt.SchemaValidateCtxtcCstj|j�}|S)z3Check if any error was detected during validation. )r2ZxmlSchemaIsValidr)rr*rrr�
schemaIsValid3szSchemaValidCtxt.schemaIsValidcCstj|j|�}|S)z3Sets the options to be used during the validation. )r2ZxmlSchemaSetValidOptionsr)rr�r*rrr�schemaSetValidOptions8sz%SchemaValidCtxt.schemaSetValidOptionscCstj|j�}|S)z$Get the validation context options. )r2ZxmlSchemaValidCtxtGetOptionsr)rr*rrr�schemaValidCtxtGetOptions=sz)SchemaValidCtxt.schemaValidCtxtGetOptionscCs*tj|j�}|dkrtd��t|d�}|S)zOallow access to the parser context of the schema validation
           context Nz(xmlSchemaValidCtxtGetParserCtxt() failed)r)r2ZxmlSchemaValidCtxtGetParserCtxtrrr�)rr*Z_SchemaValidCtxt__tmprrr�schemaValidCtxtGetParserCtxtBs

z,SchemaValidCtxt.schemaValidCtxtGetParserCtxtcCs&|dkrd}n|j}tj|j|�}|S)z$Validate a document tree in memory. N)rr2r�)rrsr�r*rrrr�Js
z!SchemaValidCtxt.schemaValidateDoccCstj|j||�}|S)zpDo a schemas validation of the given resource, it will use
           the SAX streamable validation internally. )r2ZxmlSchemaValidateFiler)rr�r�r*rrr�schemaValidateFileQsz"SchemaValidCtxt.schemaValidateFilecCs&|dkrd}n|j}tj|j|�}|S)z<Validate a branch of a tree, starting with the given @elem. N)rr2r�)rrPr�r*rrrr�Ws
z(SchemaValidCtxt.schemaValidateOneElementcCstj|j|�dS)zlWorkaround to provide file error reporting information when
           this is not provided by current APIs N)r2ZxmlSchemaValidateSetFilenamer)rr�rrr�schemaValidateSetFilename^sz)SchemaValidCtxt.schemaValidateSetFilename)N)rrrrr5r/r0r1r2r3r�r4r�r5rrrrr,s
	r,c@s&eZdZddd�Zdd�Zdd�ZdS)	r�NcCs|dkr||_dSd|_dS)N)r)rrrrrrdszxmlTextReaderLocator.__init__cCstj|j�}|S)z+Obtain the base URI for the given locator. )r2ZxmlTextReaderLocatorBaseURIr)rr*rrr�BaseURIlszxmlTextReaderLocator.BaseURIcCstj|j�}|S)z.Obtain the line number for the given locator. )r2ZxmlTextReaderLocatorLineNumberr)rr*rrr�
LineNumberqszxmlTextReaderLocator.LineNumber)N)rrrrr6r7rrrrr�cs
r�c@seZdZd�dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Z d>d?�Z!d@dA�Z"dBdC�Z#dDdE�Z$dFdG�Z%dHdI�Z&dJdK�Z'dLdM�Z(dNdO�Z)dPdQ�Z*dRdS�Z+dTdU�Z,dVdW�Z-dXdY�Z.dZd[�Z/d\d]�Z0d^d_�Z1d`da�Z2dbdc�Z3ddde�Z4dfdg�Z5dhdi�Z6djdk�Z7dldm�Z8dndo�Z9dpdq�Z:drds�Z;dtdu�Z<dvdw�Z=dxdy�Z>dzd{�Z?d|d}�Z@d~d�ZAd�d��ZBd�d��ZCdS)�r�NcCsd|_||_tj||d�dS)N)r)r�rr�r)rrrrrrwszxmlTextReader.__init__cCs |jdkrtj|j�d|_dS)N)rr2r�)rrrrr5|s
zxmlTextReader.__del__cCstj|j�}|S)z6Provides the number of attributes of the current node )r2ZxmlTextReaderAttributeCountr)rr*rrr�AttributeCount�szxmlTextReader.AttributeCountcCstj|j�}|S)zThe base URI of the node. )r2ZxmlTextReaderConstBaseUrir)rr*rrr�BaseUri�szxmlTextReader.BaseUricCstj|j�}|S)a@This function provides the current index of the parser used
          by the reader, relative to the start of the current entity.
          This function actually just wraps a call to
          xmlBytesConsumed() for the parser context associated with
           the reader. See xmlBytesConsumed() for more information. )r2ZxmlTextReaderByteConsumedr)rr*rrr�ByteConsumed�szxmlTextReader.ByteConsumedcCstj|j�}|S)z�This method releases any resources allocated by the current
          instance changes the state to Closed and close any
           underlying input. )r2ZxmlTextReaderCloser)rr*rrr�Close�szxmlTextReader.ClosecCs*tj|j�}|dkrtd��t|d�}|S)a\Hacking interface allowing to get the xmlDocPtr
          correponding to the current document being accessed by the
          xmlTextReader. NOTE: as a result of this call, the reader
          will not destroy the associated XML document and calling
          xmlFreeDoc() on the result is needed once the reader
           parsing has finished. Nz xmlTextReaderCurrentDoc() failed)r)r2ZxmlTextReaderCurrentDocrrrt)rr*�_xmlTextReader__tmprrr�
CurrentDoc�s

zxmlTextReader.CurrentDoccCs*tj|j�}|dkrtd��t|d�}|S)z�Hacking interface allowing to get the xmlNodePtr
          correponding to the current node being accessed by the
          xmlTextReader. This is dangerous because the underlying
           node may be destroyed on the next Reads. Nz!xmlTextReaderCurrentNode() failed)r)r2ZxmlTextReaderCurrentNoderrr�)rr*r<rrr�CurrentNode�s

zxmlTextReader.CurrentNodecCstj|j�}|S)z#The depth of the node in the tree. )r2ZxmlTextReaderDepthr)rr*rrr�Depth�szxmlTextReader.DepthcCstj|j�}|S)z3Determine the encoding of the document being read. )r2ZxmlTextReaderConstEncodingr)rr*rrr�Encoding�szxmlTextReader.EncodingcCs*tj|j�}|dkrtd��t|d�}|S)z�Reads the contents of the current node and the full
          subtree. It then makes the subtree available until the next
           xmlTextReaderRead() call NzxmlTextReaderExpand() failed)r)r2ZxmlTextReaderExpandrrr�)rr*r<rrr�Expand�s

zxmlTextReader.ExpandcCstj|j|�}|S)zRProvides the value of the attribute with the specified
           qualified name. )r2ZxmlTextReaderGetAttributer)rrCr*rrr�GetAttribute�szxmlTextReader.GetAttributecCstj|j|�}|S)zlProvides the value of the attribute with the specified
           index relative to the containing element. )r2ZxmlTextReaderGetAttributeNor)r�nor*rrr�GetAttributeNo�szxmlTextReader.GetAttributeNocCstj|j||�}|S)z.Provides the value of the specified attribute )r2ZxmlTextReaderGetAttributeNsr)r�	localName�namespaceURIr*rrr�GetAttributeNs�szxmlTextReader.GetAttributeNscCstj|j�}|S)z8Provide the column number of the current parsing point. )r2Z"xmlTextReaderGetParserColumnNumberr)rr*rrr�GetParserColumnNumber�sz#xmlTextReader.GetParserColumnNumbercCstj|j�}|S)z6Provide the line number of the current parsing point. )r2Z xmlTextReaderGetParserLineNumberr)rr*rrr�GetParserLineNumber�sz!xmlTextReader.GetParserLineNumbercCstj|j|�}|S)z#Read the parser internal property. )r2ZxmlTextReaderGetParserPropr)rr�r*rrr�
GetParserProp�szxmlTextReader.GetParserPropcCs*tj|j�}|dkrtd��t|d�}|S)a�Method 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 procgressed past what's left in reader->input,
          and there is an allocation problem. Best would be to
           rewrite it differently. Nz"xmlTextReaderGetRemainder() failed)r)r2ZxmlTextReaderGetRemainderrrrk)rr*r<rrr�GetRemainder�s

zxmlTextReader.GetRemaindercCstj|j�}|S)z!Whether the node has attributes. )r2ZxmlTextReaderHasAttributesr)rr*rrr�
HasAttributes�szxmlTextReader.HasAttributescCstj|j�}|S)z(Whether the node can have a text value. )r2ZxmlTextReaderHasValuer)rr*rrr�HasValue�szxmlTextReader.HasValuecCstj|j�}|S)ziWhether an Attribute  node was generated from the default
           value defined in the DTD or schema. )r2ZxmlTextReaderIsDefaultr)rr*rrr�	IsDefault�szxmlTextReader.IsDefaultcCstj|j�}|S)z#Check if the current node is empty )r2ZxmlTextReaderIsEmptyElementr)rr*rrr�IsEmptyElementszxmlTextReader.IsEmptyElementcCstj|j�}|S)zjDetermine whether the current node is a namespace
           declaration rather than a regular attribute. )r2ZxmlTextReaderIsNamespaceDeclr)rr*rrr�IsNamespaceDecl
szxmlTextReader.IsNamespaceDeclcCstj|j�}|S)z5Retrieve the validity status from the parser context )r2ZxmlTextReaderIsValidr)rr*rrr�IsValidszxmlTextReader.IsValidcCstj|j�}|S)zThe local name of the node. )r2ZxmlTextReaderConstLocalNamer)rr*rrr�	LocalNameszxmlTextReader.LocalNamecCstj|j|�}|S)zLResolves a namespace prefix in the scope of the current
           element. )r2ZxmlTextReaderLookupNamespacer)rr~r*rrr�LookupNamespaceszxmlTextReader.LookupNamespacecCstj|j|�}|S)zjMoves the position of the current instance to the attribute
           with the specified qualified name. )r2ZxmlTextReaderMoveToAttributer)rrCr*rrr�MoveToAttribute szxmlTextReader.MoveToAttributecCstj|j|�}|S)z�Moves the position of the current instance to the attribute
          with the specified index relative to the containing element. )r2ZxmlTextReaderMoveToAttributeNor)rrCr*rrr�MoveToAttributeNo&szxmlTextReader.MoveToAttributeNocCstj|j||�}|S)zxMoves the position of the current instance to the attribute
           with the specified local name and namespace URI. )r2ZxmlTextReaderMoveToAttributeNsr)rrErFr*rrr�MoveToAttributeNs,szxmlTextReader.MoveToAttributeNscCstj|j�}|S)zmMoves the position of the current instance to the node that
           contains the current Attribute  node. )r2ZxmlTextReaderMoveToElementr)rr*rrr�
MoveToElement2szxmlTextReader.MoveToElementcCstj|j�}|S)zoMoves the position of the current instance to the first
           attribute associated with the current node. )r2Z!xmlTextReaderMoveToFirstAttributer)rr*rrr�MoveToFirstAttribute8sz"xmlTextReader.MoveToFirstAttributecCstj|j�}|S)znMoves the position of the current instance to the next
           attribute associated with the current node. )r2Z xmlTextReaderMoveToNextAttributer)rr*rrr�MoveToNextAttribute>sz!xmlTextReader.MoveToNextAttributecCstj|j�}|S)z<The qualified name of the node, equal to Prefix :LocalName. )r2ZxmlTextReaderConstNamer)rr*rrr�NameDszxmlTextReader.NamecCstj|j�}|S)z9The URI defining the namespace associated with the node. )r2ZxmlTextReaderConstNamespaceUrir)rr*rrr�NamespaceUriIszxmlTextReader.NamespaceUricCstj|j||||�}|S)z�Setup an xmltextReader to parse an XML in-memory document.
          The parsing flags @options are a combination of
          xmlParserOption. This reuses the existing @reader
           xmlTextReader. )r2ZxmlReaderNewDocr)rr�r�rzr�r*rrr�NewDocNszxmlTextReader.NewDoccCstj|j||||�}|S)a.Setup an xmltextReader to parse an XML from a file
          descriptor. NOTE that the file descriptor will not be
          closed when the reader is closed or reset. The parsing
          flags @options are a combination of xmlParserOption. This
           reuses the existing @reader xmlTextReader. )r2ZxmlReaderNewFdr)rr�r�rzr�r*rrr�NewFdVszxmlTextReader.NewFdcCstj|j|||�}|S)z�parse an XML file from the filesystem or the network. The
          parsing flags @options are a combination of
          xmlParserOption. This reuses the existing @reader
           xmlTextReader. )r2ZxmlReaderNewFiler)rr�rzr�r*rrr�NewFile_szxmlTextReader.NewFilecCstj|j|||||�}|S)z�Setup an xmltextReader to parse an XML in-memory document.
          The parsing flags @options are a combination of
          xmlParserOption. This reuses the existing @reader
           xmlTextReader. )r2ZxmlReaderNewMemoryr)rr�r�r�rzr�r*rrr�	NewMemorygszxmlTextReader.NewMemorycCs&|dkrd}n|j}tj|j|�}|S)zuSetup an xmltextReader to parse a preparsed XML document.
           This reuses the existing @reader xmlTextReader. N)rr2r�)rrsr�r*rrrr�os
zxmlTextReader.NewWalkercCstj|j�}|S)zkSkip to the node following the current one in document
           order while avoiding the subtree if any. )r2ZxmlTextReaderNextr)rr*rrr�NextwszxmlTextReader.NextcCstj|j�}|S)z�Skip to the node following the current one in document
          order while avoiding the subtree if any. Currently
           implemented only for Readers built on a document )r2ZxmlTextReaderNextSiblingr)rr*rrr�NextSibling}szxmlTextReader.NextSiblingcCstj|j�}|S)z�Get the node type of the current node Reference:
          http://www.gnu.org/software/dotgnu/pnetlib-doc/System/Xml/Xm
          lNodeType.html )r2ZxmlTextReaderNodeTyper)rr*rrr�NodeType�szxmlTextReader.NodeTypecCstj|j�}|S)ahThe value indicating whether to normalize white space and
          attribute values. Since attribute value and end of line
          normalizations are a MUST in the XML specification only the
          value true is accepted. The broken bahaviour of accepting
          out of range character entities like &#0; is of course not
           supported either. )r2ZxmlTextReaderNormalizationr)rr*rrr�
Normalization�szxmlTextReader.NormalizationcCstj|j�}|S)zLA shorthand reference to the namespace associated with the
           node. )r2ZxmlTextReaderConstPrefixr)rr*rrr�Prefix�szxmlTextReader.PrefixcCs*tj|j�}|dkrtd��t|d�}|S)z�This tells the XML Reader to preserve the current node. The
          caller must also use xmlTextReaderCurrentDoc() to keep an
           handle on the resulting document once parsing has finished NzxmlTextReaderPreserve() failed)r)r2ZxmlTextReaderPreserverrr�)rr*r<rrr�Preserve�s

zxmlTextReader.PreservecCstj|j�}|S)zSThe quotation mark character used to enclose the value of
           an attribute. )r2ZxmlTextReaderQuoteCharr)rr*rrr�	QuoteChar�szxmlTextReader.QuoteCharcCstj|j�}|S)zoMoves the position of the current instance to the next node
           in the stream, exposing its properties. )r2ZxmlTextReaderReadr)rr*rrr�Read�szxmlTextReader.ReadcCstj|j�}|S)zVParses an attribute value into one or more Text and
           EntityReference nodes. )r2ZxmlTextReaderReadAttributeValuer)rr*rrr�ReadAttributeValue�sz xmlTextReader.ReadAttributeValuecCstj|j�}|S)zUReads the contents of the current node, including child
           nodes and markup. )r2ZxmlTextReaderReadInnerXmlr)rr*rrr�ReadInnerXml�szxmlTextReader.ReadInnerXmlcCstj|j�}|S)zUReads the contents of the current node, including child
           nodes and markup. )r2ZxmlTextReaderReadOuterXmlr)rr*rrr�ReadOuterXml�szxmlTextReader.ReadOuterXmlcCstj|j�}|S)z#Gets the read state of the reader. )r2ZxmlTextReaderReadStater)rr*rrr�	ReadState�szxmlTextReader.ReadStatecCstj|j�}|S)z=Reads the contents of an element or a text node as a string. )r2ZxmlTextReaderReadStringr)rr*rrr�
ReadString�szxmlTextReader.ReadStringcCs&|dkrd}n|j}tj|j|�}|S)a7Use 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 desactivated. @
          The @schema should not be freed until the reader is
           deallocated or its use has been deactivated. N)rr2r")rr �	schema__or*rrrr#�s
zxmlTextReader.RelaxNGSetSchemacCstj|j|�}|S)z�Use RelaxNG schema to validate the document as it is
          processed. Activation is only possible before the first
          Read(). If @rng is None, then RelaxNG schema validation is
           deactivated. )r2ZxmlTextReaderRelaxNGValidater)r�rngr*rrr�RelaxNGValidate�szxmlTextReader.RelaxNGValidatecCs(|dkrd}n|j}tj|j||�}|S)z�Use RelaxNG schema context to validate the document as it
          is processed. Activation is only possible before the first
          Read(). If @ctxt is None, then RelaxNG schema validation is
           deactivated. N)rr2r%)rr�r�rer*rrrr&�s
z!xmlTextReader.RelaxNGValidateCtxtcCstj|j|�}|S)z�Use W3C XSD schema to validate the document as it is
          processed. Activation is only possible before the first
          Read(). If @xsd is None, then XML Schema validation is
           deactivated. )r2ZxmlTextReaderSchemaValidater)rZxsdr*rrr�SchemaValidate�szxmlTextReader.SchemaValidatecCs(|dkrd}n|j}tj|j||�}|S)z�Use W3C XSD schema context to validate the document as it
          is processed. Activation is only possible before the first
          Read(). If @ctxt is None, then XML Schema validation is
           deactivated. N)rr2r.)rr�r�rer*rrrr/�s
z xmlTextReader.SchemaValidateCtxtcCstj|j||�}|S)z�Change the parser processing behaviour by changing some of
          its internal properties. Note that some properties can only
           be changed before any read has been done. )r2ZxmlTextReaderSetParserPropr)rr�rr*rrr�
SetParserProp�szxmlTextReader.SetParserPropcCs&|dkrd}n|j}tj|j|�}|S)a9Use 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 desactivated. @
          The @schema should not be freed until the reader is
           deallocated or its use has been deactivated. N)rr2r))rr rmr*rrrr*s
zxmlTextReader.SetSchemacCs,|dkrd}n|j}tj|j||||�}|S)z%Setup an XML reader with new options N)rr2r)rr�r�rzr�Zinput__or*rrrr
s
zxmlTextReader.SetupcCstj|j�}|S)z<Determine the standalone status of the document being read. )r2ZxmlTextReaderStandaloner)rr*rrr�
StandaloneszxmlTextReader.StandalonecCstj|j|�}|S)ziGet an interned string from the reader, allows for example
           to speedup string name comparisons )r2ZxmlTextReaderConstStringr)rr.r*rrr�StringszxmlTextReader.StringcCstj|j�}|S)z/Provides the text value of the node if present )r2ZxmlTextReaderConstValuer)rr*rrr�ValueszxmlTextReader.ValuecCstj|j�}|S)z2The xml:lang scope within which the node resides. )r2ZxmlTextReaderConstXmlLangr)rr*rrr�XmlLang$szxmlTextReader.XmlLangcCstj|j�}|S)z6Determine the XML version of the document being read. )r2ZxmlTextReaderConstXmlVersionr)rr*rrr�
XmlVersion)szxmlTextReader.XmlVersion)N)Drrrrr5r8r9r:r;r=r>r?r@rArBrDrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r�r`rarbrcrdrerfrgrhrirjrkrlr#ror&rpr/rqr*rrrrsrtrurvrrrrr�vs�
		
	
	
	

r�c@s�eZdZd4dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�ZdS)5r�NcCs|dkr||_dSd|_dS)N)r)rrrrrr/szURI.__init__cCs |jdkrtj|j�d|_dS)N)rr2Z
xmlFreeURI)rrrrr53s
zURI.__del__cCstj|j�}|S)z#Get the authority part from an URI )r2ZxmlURIGetAuthorityr)rr*rrr�	authority9sz
URI.authoritycCstj|j�}|S)z"Get the fragment part from an URI )r2ZxmlURIGetFragmentr)rr*rrr�fragment>szURI.fragmentcCstj|j�}|S)z Get the opaque part from an URI )r2ZxmlURIGetOpaquer)rr*rrr�opaqueCsz
URI.opaquecCstj|j�}|S)zGet the path part from an URI )r2Z
xmlURIGetPathr)rr*rrrr�HszURI.pathcCstj|j�}|S)zGet the port part from an URI )r2Z
xmlURIGetPortr)rr*rrrr;MszURI.portcCstj|j�}|S)zGet the query part from an URI )r2ZxmlURIGetQueryr)rr*rrr�queryRsz	URI.querycCstj|j�}|S)zIGet the raw query part from an URI (i.e. the unescaped
           form). )r2ZxmlURIGetQueryRawr)rr*rrr�queryRawWszURI.queryRawcCstj|j�}|S)z Get the scheme part from an URI )r2ZxmlURIGetSchemer)rr*rrr�scheme]sz
URI.schemecCstj|j�}|S)z Get the server part from an URI )r2ZxmlURIGetServerr)rr*rrr�serverbsz
URI.servercCstj|j|�dS)z"Set the authority part of an URI. N)r2ZxmlURISetAuthorityr)rrwrrr�setAuthoritygszURI.setAuthoritycCstj|j|�dS)z!Set the fragment part of an URI. N)r2ZxmlURISetFragmentr)rrxrrr�setFragmentkszURI.setFragmentcCstj|j|�dS)zSet the opaque part of an URI. N)r2ZxmlURISetOpaquer)rryrrr�	setOpaqueosz
URI.setOpaquecCstj|j|�dS)zSet the path part of an URI. N)r2Z
xmlURISetPathr)rr�rrr�setPathsszURI.setPathcCstj|j|�dS)zSet the port part of an URI. N)r2Z
xmlURISetPortr)rr;rrr�setPortwszURI.setPortcCstj|j|�dS)zSet the query part of an URI. N)r2ZxmlURISetQueryr)rrzrrr�setQuery{szURI.setQuerycCstj|j|�dS)z<Set the raw query part of an URI (i.e. the unescaped form). N)r2ZxmlURISetQueryRawr)rZ	query_rawrrr�setQueryRawszURI.setQueryRawcCstj|j|�dS)zSet the scheme part of an URI. N)r2ZxmlURISetSchemer)rr|rrr�	setScheme�sz
URI.setSchemecCstj|j|�dS)zSet the server part of an URI. N)r2ZxmlURISetServerr)rr}rrr�	setServer�sz
URI.setServercCstj|j|�dS)zSet the user part of an URI. N)r2Z
xmlURISetUserr)rr<rrr�setUser�szURI.setUsercCstj|j�}|S)zGet the user part from an URI )r2Z
xmlURIGetUserr)rr*rrrr<�szURI.usercCstj|j|�}|S)z�Parse an URI reference string based on RFC 3986 and fills
          in the appropriate fields of the @uri structure 
           URI-reference = URI / relative-ref )r2ZxmlParseURIReferencer)rr.r*rrr�parseURIReference�szURI.parseURIReferencecCstj||j�dS)z&Prints the URI in the stream @stream. N)r2ZxmlPrintURIr)r�streamrrr�printURI�szURI.printURIcCstj|j�}|S)z"Save the URI as an escaped string )r2Z
xmlSaveUrir)rr*rrr�saveUri�szURI.saveUri)N)rrrrr5rwrxryr�r;rzr{r|r}r~rr�r�r�r�r�r�r�r�r<r�r�r�rrrrr�.s2
	r�c@s�eZdZd"dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�ZdS)#r�NcCs||_tj||d�dS)N)r)rr�r)rrrrrr�szValidCtxt.__init__cCs |jdkrtj|j�d|_dS)N)rr2ZxmlFreeValidCtxt)rrrrr5�s
zValidCtxt.__del__cCs@|dkrd}n|j}|dkr"d}n|j}tj|j||||�}|S)a�Does the validation related extra step of the normalization
          of attribute values:  If the declared value is not CDATA,
          then the XML processor must further process the normalized
          attribute value by discarding any leading and trailing
          space (#x20) characters, and by replacing sequences of
          space (#x20) characters by single space (#x20) character. 
          Also  check VC: Standalone Document Declaration in P32, and
           update ctxt->valid accordingly N)rr2ro)rrsrPrCrr�r�r*rrrrp�s	z*ValidCtxt.validCtxtNormalizeAttributeValuecCs&|dkrd}n|j}tj|j|�}|S)z�Try to validate the document instance  basically it does
          the all the checks described by the XML Rec i.e. validates
          the internal and external subset (if present) and validate
           the document tree. N)rr2rq)rrsr�r*rrrrr�s
zValidCtxt.validateDocumentcCs&|dkrd}n|j}tj|j|�}|S)aDoes the final step for the document validation once all
          the incremental validation steps have been completed 
          basically it does the following checks described by the XML
          Rec  Check all the IDREF/IDREFS attributes definition for
           validity N)rr2rs)rrsr�r*rrrrt�s
zValidCtxt.validateDocumentFinalcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||�}|S)aTry to validate the document against the dtd instance 
          Basically it does check all the definitions in the DtD.
          Note the the internal subset (if present) is de-coupled
          (i.e. not used), which could give problems if ID or IDREF
           is present. N)rr2ru)rrsr�r�rvr*rrrrw�szValidCtxt.validateDtdcCs&|dkrd}n|j}tj|j|�}|S)a�Does the final step for the dtds validation once all the
          subsets have been parsed  basically it does the following
          checks described by the XML Rec - check that ENTITY and
          ENTITIES type attributes default or possible values matches
          one of the defined entities. - check that NOTATION type
          attributes default or possible values matches one of the
           defined notations. N)rr2rx)rrsr�r*rrrry�s
zValidCtxt.validateDtdFinalcCs<|dkrd}n|j}|dkr"d}n|j}tj|j||�}|S)z-Try to validate the subtree under an element N)rr2rz)rrsrPr�r�r*rrrr{�szValidCtxt.validateElementcCs(|dkrd}n|j}tj|j||�}|S)zbValidate that the given name match a notation declaration.
           - [ VC: Notation Declared ] N)rr2r|)rrsrSr�r*rrrr}�s
zValidCtxt.validateNotationUsec	CsT|dkrd}n|j}|dkr"d}n|j}|dkr6d}n|j}tj|j||||�}|S)a�Try to validate a single attribute for an element basically
          it does the following checks as described by the XML-1.0
          recommendation: - [ VC: Attribute Value Type ] - [ VC:
          Fixed Attribute Default ] - [ VC: Entity Name ] - [ VC:
          Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC: Entity
          Name ] - [ VC: Notation Attributes ]  The ID/IDREF
           uniqueness and matching are done separately N)rr2r~)	rrsrPrxrr�r�r�r*rrrrszValidCtxt.validateOneAttributecCs<|dkrd}n|j}|dkr"d}n|j}tj|j||�}|S)a]Try to validate a single element and it's attributes,
          basically it does the following checks as described by the
          XML-1.0 recommendation: - [ VC: Element Valid ] - [ VC:
          Required Attribute ] Then call xmlValidateOneAttribute()
          for each attribute present.  The ID/IDREF checkings are
           done separately N)rr2r�)rrsrPr�r�r*rrrr�szValidCtxt.validateOneElementc
CsV|dkrd}n|j}|dkr"d}n|j}|dkr6d}n|j}tj|j|||||�}	|	S)a�Try to validate a single namespace declaration for an
          element basically it does the following checks as described
          by the XML-1.0 recommendation: - [ VC: Attribute Value Type
          ] - [ VC: Fixed Attribute Default ] - [ VC: Entity Name ] -
          [ VC: Name Token ] - [ VC: ID ] - [ VC: IDREF ] - [ VC:
          Entity Name ] - [ VC: Notation Attributes ]  The ID/IDREF
           uniqueness and matching are done separately N)rr2r�)
rrsrPr~ryrr�r�r�r*rrrr�%szValidCtxt.validateOneNamespacecCs>|dkrd}n|j}|dkr"d}n|j}tj|j|||�}|S)z/Pop the element end from the validation stack. N)rr2r�)rrsrPr�r�r�r*rrrr�6szValidCtxt.validatePopElementcCstj|j||�}|S)z;check the CData parsed for validation in the current stack )r2ZxmlValidatePushCDatar)rr@r)r*rrr�validatePushCData?szValidCtxt.validatePushCDatacCs>|dkrd}n|j}|dkr"d}n|j}tj|j|||�}|S)z2Push a new element start on the validation stack. N)rr2r�)rrsrPr�r�r�r*rrrr�DszValidCtxt.validatePushElementcCs&|dkrd}n|j}tj|j|�}|S)z�Try to validate a the root element basically it does the
          following check as described by the XML-1.0 recommendation:
          - [ VC: Root Element Type ] it doesn't try to recurse or
           apply other check to the element N)rr2r�)rrsr�r*rrrr�Ms
zValidCtxt.validateRoot)N)rrrrr5rprrrtrwryr{r}rr�r�r�r�r�r�rrrrr��s 
	


			r�c@s�eZdZd4dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�ZdS)5r	NcCs|dkr||_dSd|_dS)N)r)rrrrrrXszxpathContext.__init__cCs*tj|j�}|dkrtd��t|d�}|S)z!Get the doc from an xpathContext NzxmlXPathGetContextDoc() failed)r)r2ZxmlXPathGetContextDocrrrt)rr*�_xpathContext__tmprrr�
contextDoc]s

zxpathContext.contextDoccCs*tj|j�}|dkrtd��t|d�}|S)z*Get the current node from an xpathContext NzxmlXPathGetContextNode() failed)r)r2ZxmlXPathGetContextNoderrr�)rr*r�rrr�contextNodeds

zxpathContext.contextNodecCstj|j�}|S)z*Get the current node from an xpathContext )r2ZxmlXPathGetContextPositionr)rr*rrr�contextPositionkszxpathContext.contextPositioncCstj|j�}|S)z*Get the current node from an xpathContext )r2ZxmlXPathGetContextSizer)rr*rrr�contextSizepszxpathContext.contextSizecCstj|j�}|S)z+Get the current function name xpathContext )r2ZxmlXPathGetFunctionr)rr*rrr�functionuszxpathContext.functioncCstj|j�}|S)z/Get the current function name URI xpathContext )r2ZxmlXPathGetFunctionURIr)rr*rrr�functionURIzszxpathContext.functionURIcCs&|dkrd}n|j}tj|j|�dS)zSet the doc of an xpathContext N)rr2ZxmlXPathSetContextDoc)rrsr�rrr�
setContextDocszxpathContext.setContextDoccCs&|dkrd}n|j}tj|j|�dS)z(Set the current node of an xpathContext N)rr2ZxmlXPathSetContextNode)rr�r;rrrr��szxpathContext.setContextNodecCstj|j|||�}|S)z<Register a Python written function to the XPath interpreter )r2r�r)rrCr�r�r*rrrr��sz"xpathContext.registerXPathFunctioncCstj|j|||�}|S)z+Register a variable with the XPath context )r2ZxmlXPathRegisterVariabler)rrCr�rr*rrr�xpathRegisterVariable�sz"xpathContext.xpathRegisterVariablecCstj|j|||�}|S)a�Creates/frees an object cache on the XPath context. If
          activates XPath objects (xmlXPathObject) will be cached
          internally to be reused. @options: 0: This will set the
          XPath object caching: @value: This will set the maximum
          number of XPath objects to be cached per slot There are 5
          slots for: node-set, string, number, boolean, and misc
          objects. Use <0 for the default number (100). Other values
           for @options have currently no effect. )r2ZxmlXPathContextSetCacher)rZactiverr�r*rrr�xpathContextSetCache�s	z!xpathContext.xpathContextSetCachecCs&tj||j�}|dkrtd��t|�S)z7Evaluate the XPath Location Path in the given context. NzxmlXPathEval() failed)r2ZxmlXPathEvalrrr�)rr.r*rrrr��szxpathContext.xpathEvalcCs&tj||j�}|dkrtd��t|�S)zAlias for xmlXPathEval(). NzxmlXPathEvalExpression() failed)r2ZxmlXPathEvalExpressionrrr�)rr.r*rrr�xpathEvalExpression�sz xpathContext.xpathEvalExpressioncCstj|j�dS)zFree up an xmlXPathContext N)r2ZxmlXPathFreeContextr)rrrrr��szxpathContext.xpathFreeContextcCs,tj||j�}|dkrtd��t|d�}|S)z#Create a new xmlXPathParserContext Nz!xmlXPathNewParserContext() failed)r)r2ZxmlXPathNewParserContextrr�xpathParserContext)rr.r*r�rrr�xpathNewParserContext�s

z"xpathContext.xpathNewParserContextcCstj|j|�}|S)z�Search in the namespace declaration array of the context
           for the given namespace name associated to the given prefix )r2ZxmlXPathNsLookupr)rr~r*rrr�
xpathNsLookup�szxpathContext.xpathNsLookupcCstj|j�dS)z6Registers all default XPath functions in this context N)r2ZxmlXPathRegisterAllFunctionsr)rrrr�xpathRegisterAllFunctions�sz&xpathContext.xpathRegisterAllFunctionscCstj|j||�}|S)zURegister a new namespace. If @ns_uri is None it unregisters
           the namespace )r2ZxmlXPathRegisterNsr)rr~r�r*rrr�xpathRegisterNs�szxpathContext.xpathRegisterNscCstj|j�dS)zMCleanup the XPath context data associated to registered
           functions N)r2ZxmlXPathRegisteredFuncsCleanupr)rrrr�xpathRegisteredFuncsCleanup�sz(xpathContext.xpathRegisteredFuncsCleanupcCstj|j�dS)zMCleanup the XPath context data associated to registered
           variables N)r2ZxmlXPathRegisteredNsCleanupr)rrrr�xpathRegisteredNsCleanup�sz%xpathContext.xpathRegisteredNsCleanupcCstj|j�dS)zMCleanup the XPath context data associated to registered
           variables N)r2Z"xmlXPathRegisteredVariablesCleanupr)rrrr�xpathRegisteredVariablesCleanup�sz,xpathContext.xpathRegisteredVariablesCleanupcCs&tj|j|�}|dkrtd��t|�S)zUSearch in the Variable array of the context for the given
           variable value. NzxmlXPathVariableLookup() failed)r2ZxmlXPathVariableLookuprrr�)rrCr*rrr�xpathVariableLookup�sz xpathContext.xpathVariableLookupcCs(tj|j||�}|dkr td��t|�S)zUSearch in the Variable array of the context for the given
           variable value. Nz!xmlXPathVariableLookupNS() failed)r2ZxmlXPathVariableLookupNSrrr�)rrCr�r*rrr�xpathVariableLookupNS�sz"xpathContext.xpathVariableLookupNScCs&tj||j�}|dkrtd��t|�S)z7Evaluate the XPath Location Path in the given context. NzxmlXPtrEval() failed)r2ZxmlXPtrEvalrrr�)rr.r*rrr�xpointerEval�szxpathContext.xpointerEval)N)rrrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr	Ws2

	r	c@s�eZdZd~dd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�Zd8d9�Zd:d;�Zd<d=�Z d>d?�Z!d@dA�Z"dBdC�Z#dDdE�Z$dFdG�Z%dHdI�Z&dJdK�Z'dLdM�Z(dNdO�Z)dPdQ�Z*dRdS�Z+dTdU�Z,dVdW�Z-dXdY�Z.dZd[�Z/d\d]�Z0d^d_�Z1d`da�Z2dbdc�Z3ddde�Z4dfdg�Z5dhdi�Z6djdk�Z7dldm�Z8dndo�Z9dpdq�Z:drds�Z;dtdu�Z<dvdw�Z=dxdy�Z>dzd{�Z?d|d}�Z@dS)r�NcCs|dkr||_dSd|_dS)N)r)rrrrrr�szxpathParserContext.__init__cCs*tj|j�}|dkrtd��t|d�}|S)z0Get the xpathContext from an xpathParserContext Nz!xmlXPathParserGetContext() failed)r)r2ZxmlXPathParserGetContextrrr	)rr*�_xpathParserContext__tmprrr�contexts

zxpathParserContext.contextcCstj|j�dS)z�Implement the add operation on XPath objects: The numeric
          operators convert their operands to numbers as if by
           calling the number function. N)r2ZxmlXPathAddValuesr)rrrr�xpathAddValuessz!xpathParserContext.xpathAddValuescCstj|j|�dS)auImplement the boolean() XPath function boolean
          boolean(object) The boolean function converts its argument
          to a boolean as follows: - a number is true if and only if
          it is neither positive or negative zero nor NaN - a
          node-set is true if and only if it is non-empty - a string
           is true if and only if its length is non-zero N)r2ZxmlXPathBooleanFunctionr)r�nargsrrr�xpathBooleanFunctionsz'xpathParserContext.xpathBooleanFunctioncCstj|j|�dS)z�Implement the ceiling() XPath function number
          ceiling(number) The ceiling function returns the smallest
          (closest to negative infinity) number that is not less than
           the argument and that is an integer. N)r2ZxmlXPathCeilingFunctionr)rr�rrr�xpathCeilingFunctionsz'xpathParserContext.xpathCeilingFunctioncCstj|j||�}|S)a�Implement the compare operation on XPath objects: @arg1 <
          @arg2    (1, 1, ... @arg1 <= @arg2   (1, 0, ... @arg1 >
          @arg2    (0, 1, ... @arg1 >= @arg2   (0, 0, ...  When
          neither object to be compared is a node-set and the
          operator is <=, <, >=, >, then the objects are compared by
          converted both objects to numbers and comparing the numbers
          according to IEEE 754. The < comparison will be true if and
          only if the first number is less than the second number.
          The <= comparison will be true if and only if the first
          number is less than or equal to the second number. The >
          comparison will be true if and only if the first number is
          greater than the second number. The >= comparison will be
          true if and only if the first number is greater than or
           equal to the second number. )r2ZxmlXPathCompareValuesr)r�inf�strictr*rrr�xpathCompareValues"sz%xpathParserContext.xpathCompareValuescCstj|j|�dS)z�Implement the concat() XPath function string concat(string,
          string, string*) The concat function returns the
           concatenation of its arguments. N)r2ZxmlXPathConcatFunctionr)rr�rrr�xpathConcatFunction4sz&xpathParserContext.xpathConcatFunctioncCstj|j|�dS)z�Implement the contains() XPath function boolean
          contains(string, string) The contains function returns true
          if the first argument string contains the second argument
           string, and otherwise returns false. N)r2ZxmlXPathContainsFunctionr)rr�rrr�xpathContainsFunction:sz(xpathParserContext.xpathContainsFunctioncCstj|j|�dS)z<Implement the count() XPath function number count(node-set) N)r2ZxmlXPathCountFunctionr)rr�rrr�xpathCountFunctionAsz%xpathParserContext.xpathCountFunctioncCstj|j�dS)z�Implement the div operation on XPath objects @arg1 / @arg2:
          The numeric operators convert their operands to numbers as
           if by calling the number function. N)r2ZxmlXPathDivValuesr)rrrr�xpathDivValuesEsz!xpathParserContext.xpathDivValuescCstj|j�}|S)zRImplement the equal operation on XPath objects content:
           @arg1 == @arg2 )r2ZxmlXPathEqualValuesr)rr*rrr�xpathEqualValuesKsz#xpathParserContext.xpathEqualValuescCstj|j|�dS)zHandle an XPath error N)r2ZxmlXPathErrr)rrUrrr�xpathErrQszxpathParserContext.xpathErrcCstj|j�dS)zrParse and evaluate an XPath expression in the given
           context, then push the result on the context stack N)r2ZxmlXPathEvalExprr)rrrr�
xpathEvalExprUsz xpathParserContext.xpathEvalExprcCstj|j|�dS)z5Implement the false() XPath function boolean false() N)r2ZxmlXPathFalseFunctionr)rr�rrr�xpathFalseFunctionZsz%xpathParserContext.xpathFalseFunctioncCstj|j|�dS)z�Implement the floor() XPath function number floor(number)
          The floor function returns the largest (closest to positive
          infinity) number that is not greater than the argument and
           that is an integer. N)r2ZxmlXPathFloorFunctionr)rr�rrr�xpathFloorFunction^sz%xpathParserContext.xpathFloorFunctioncCstj|j�dS)z!Free up an xmlXPathParserContext N)r2ZxmlXPathFreeParserContextr)rrrr�xpathFreeParserContextesz)xpathParserContext.xpathFreeParserContextcCstj|j|�dS)a@Implement the id() XPath function node-set id(object) The
          id function selects elements by their unique ID (see [5.2.1
          Unique IDs]). When the argument to id is of type node-set,
          then the result is the union of the result of applying id
          to the string value of each of the nodes in the argument
          node-set. When the argument to id is of any other type, the
          argument is converted to a string as if by a call to the
          string function; the string is split into a
          whitespace-separated list of tokens (whitespace is any
          sequence of characters matching the production S); the
          result is a node-set containing the elements in the same
          document as the context node that have a unique ID equal to
           any of the tokens in the list. N)r2ZxmlXPathIdFunctionr)rr�rrr�xpathIdFunctionisz"xpathParserContext.xpathIdFunctioncCstj|j|�dS)a�Implement the lang() XPath function boolean lang(string)
          The lang function returns true or false depending on
          whether the language of the context node as specified by
          xml:lang attributes is the same as or is a sublanguage of
          the language specified by the argument string. The language
          of the context node is determined by the value of the
          xml:lang attribute on the context node, or, if the context
          node has no xml:lang attribute, by the value of the
          xml:lang attribute on the nearest ancestor of the context
          node that has an xml:lang attribute. If there is no such
           attribute, then lang N)r2ZxmlXPathLangFunctionr)rr�rrr�xpathLangFunctionysz$xpathParserContext.xpathLangFunctioncCstj|j|�dS)z�Implement the last() XPath function number last() The last
          function returns the number of nodes in the context node
           list. N)r2ZxmlXPathLastFunctionr)rr�rrr�xpathLastFunction�sz$xpathParserContext.xpathLastFunctioncCstj|j|�dS)a�Implement the local-name() XPath function string
          local-name(node-set?) The local-name function returns a
          string containing the local part of the name of the node in
          the argument node-set that is first in document order. If
          the node-set is empty or the first node has no name, an
          empty string is returned. If the argument is omitted it
           defaults to the context node. N)r2ZxmlXPathLocalNameFunctionr)rr�rrr�xpathLocalNameFunction�sz)xpathParserContext.xpathLocalNameFunctioncCstj|j�dS)z�Implement the mod operation on XPath objects: @arg1 / @arg2
          The numeric operators convert their operands to numbers as
           if by calling the number function. N)r2ZxmlXPathModValuesr)rrrr�xpathModValues�sz!xpathParserContext.xpathModValuescCstj|j�dS)z�Implement the multiply operation on XPath objects: The
          numeric operators convert their operands to numbers as if
           by calling the number function. N)r2ZxmlXPathMultValuesr)rrrr�xpathMultValues�sz"xpathParserContext.xpathMultValuescCstj|j|�dS)a�Implement the namespace-uri() XPath function string
          namespace-uri(node-set?) The namespace-uri function returns
          a string containing the namespace URI of the expanded name
          of the node in the argument node-set that is first in
          document order. If the node-set is empty, the first node
          has no name, or the expanded name has no namespace URI, an
          empty string is returned. If the argument is omitted it
           defaults to the context node. N)r2ZxmlXPathNamespaceURIFunctionr)rr�rrr�xpathNamespaceURIFunction�s	z,xpathParserContext.xpathNamespaceURIFunctioncCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)a�Traversal 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() failed)r)rr2r�rr�)rr�r�r*r�rrrr��s
z$xpathParserContext.xpathNextAncestorcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)asTraversal 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() failed)r)rr2r�rr�)rr�r�r*r�rrrr��s
z*xpathParserContext.xpathNextAncestorOrSelfcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)zkTraversal function for the "attribute" direction TODO:
           support DTD inherited default attributes NzxmlXPathNextAttribute() failed)r)rr2r�rr�)rr�r�r*r�rrrr��s
z%xpathParserContext.xpathNextAttributecCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)z�Traversal function for the "child" direction The child axis
          contains the children of the context node in document order. NzxmlXPathNextChild() failed)r)rr2r�rr�)rr�r�r*r�rrrr��s
z!xpathParserContext.xpathNextChildcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)z�Traversal 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() failed)r)rr2r�rr�)rr�r�r*r�rrrr��s
z&xpathParserContext.xpathNextDescendantcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)aZTraversal 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() failed)r)rr2r�rr�)rr�r�r*r�rrrr��s
z,xpathParserContext.xpathNextDescendantOrSelfcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)a[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() failed)r)rr2r�rr�)rr�r�r*r�rrrr��s
z%xpathParserContext.xpathNextFollowingcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)z�Traversal function for the "following-sibling" direction
          The following-sibling axis contains the following siblings
           of the context node in document order. Nz%xmlXPathNextFollowingSibling() failed)r)rr2r�rr�)rr�r�r*r�rrrr�s
z,xpathParserContext.xpathNextFollowingSiblingcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)aYTraversal 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() failed)r)rr2r�rr�)rr�r�r*r�rrrr�s
z%xpathParserContext.xpathNextNamespacecCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)z�Traversal function for the "parent" direction The parent
          axis contains the parent of the context node, if there is
           one. NzxmlXPathNextParent() failed)r)rr2r�rr�)rr�r�r*r�rrrr s
z"xpathParserContext.xpathNextParentcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)abTraversal 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() failed)r)rr2rrr�)rr�r�r*r�rrrr+s
z%xpathParserContext.xpathNextPrecedingcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)aCTraversal 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() failed)r)rr2rrr�)rr�r�r*r�rrrr9s
z,xpathParserContext.xpathNextPrecedingSiblingcCs@|dkrd}n|j}tj|j|�}|dkr2td��t|d�}|S)zkTraversal function for the "self" direction The self axis
           contains just the context node itself NzxmlXPathNextSelf() failed)r)rr2rrr�)rr�r�r*r�rrrrFs
z xpathParserContext.xpathNextSelfcCstj|j|�dS)a.Implement the normalize-space() XPath function string
          normalize-space(string?) The normalize-space function
          returns the argument string with white space normalized by
          stripping leading and trailing whitespace and replacing
          sequences of whitespace characters by a single space.
          Whitespace characters are the same allowed by the S
          production in XML. If the argument is omitted, it defaults
          to the context node converted to a string, in other words
           the value of the context node. N)r2ZxmlXPathNormalizeFunctionr)rr�rrr�xpathNormalizeFunctionPs
z)xpathParserContext.xpathNormalizeFunctioncCstj|j�}|S)zRImplement the equal operation on XPath objects content:
           @arg1 == @arg2 )r2ZxmlXPathNotEqualValuesr)rr*rrr�xpathNotEqualValues\sz&xpathParserContext.xpathNotEqualValuescCstj|j|�dS)z�Implement the not() XPath function boolean not(boolean) The
          not function returns true if its argument is false, and
           false otherwise. N)r2ZxmlXPathNotFunctionr)rr�rrr�xpathNotFunctionbsz#xpathParserContext.xpathNotFunctioncCstj|j|�dS)z=Implement the number() XPath function number number(object?) N)r2ZxmlXPathNumberFunctionr)rr�rrr�xpathNumberFunctionhsz&xpathParserContext.xpathNumberFunctioncCstj|j�}|S)z�parse an XML namespace non qualified name.  [NS 3] NCName
          ::= (Letter | '_') (NCNameChar)*  [NS 4] NCNameChar ::=
           Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender )r2ZxmlXPathParseNCNamer)rr*rrr�xpathParseNCNamelsz#xpathParserContext.xpathParseNCNamecCstj|j�}|S)z�parse an XML name  [4] NameChar ::= Letter | Digit | '.' |
          '-' | '_' | ':' | CombiningChar | Extender  [5] Name ::=
           (Letter | '_' | ':') (NameChar)* )r2ZxmlXPathParseNamer)rr*rrr�xpathParseNamessz!xpathParserContext.xpathParseNamecCstj|j�}|S)zoPops a boolean from the stack, handling conversion if
           needed. Check error with #xmlXPathCheckError. )r2ZxmlXPathPopBooleanr)rr*rrr�xpathPopBooleanzsz"xpathParserContext.xpathPopBooleancCstj|j�}|S)znPops a number from the stack, handling conversion if
           needed. Check error with #xmlXPathCheckError. )r2ZxmlXPathPopNumberr)rr*rrr�xpathPopNumber�sz!xpathParserContext.xpathPopNumbercCstj|j�}|S)znPops a string from the stack, handling conversion if
           needed. Check error with #xmlXPathCheckError. )r2ZxmlXPathPopStringr)rr*rrr�xpathPopString�sz!xpathParserContext.xpathPopStringcCstj|j|�dS)z�Implement the position() XPath function number position()
          The position function returns the position of the context
          node in the context node list. The first position is 1, and
           so the last position will be equal to last(). N)r2ZxmlXPathPositionFunctionr)rr�rrr�xpathPositionFunction�sz(xpathParserContext.xpathPositionFunctioncCstj|j�dS)z3Initialize the context to the root of the document N)r2ZxmlXPathRootr)rrrr�	xpathRoot�szxpathParserContext.xpathRootcCstj|j|�dS)aImplement the round() XPath function number round(number)
          The round function returns the number that is closest to
          the argument and that is an integer. If there are two such
          numbers, then the one that is closest to positive infinity
           is returned. N)r2ZxmlXPathRoundFunctionr)rr�rrr�xpathRoundFunction�sz%xpathParserContext.xpathRoundFunctioncCstj|j|�dS)z�Implement the starts-with() XPath function boolean
          starts-with(string, string) The starts-with function
          returns true if the first argument string starts with the
           second argument string, and otherwise returns false. N)r2ZxmlXPathStartsWithFunctionr)rr�rrr�xpathStartsWithFunction�sz*xpathParserContext.xpathStartsWithFunctioncCstj|j|�dS)a+Implement the string() XPath function string
          string(object?) The string function converts an object to a
          string as follows: - A node-set is converted to a string by
          returning the value of the node in the node-set that is
          first in document order. If the node-set is empty, an empty
          string is returned. - A number is converted to a string as
          follows + NaN is converted to the string NaN + positive
          zero is converted to the string 0 + negative zero is
          converted to the string 0 + positive infinity is converted
          to the string Infinity + negative infinity is converted to
          the string -Infinity + if the number is an integer, the
          number is represented in decimal form as a Number with no
          decimal point and no leading zeros, preceded by a minus
          sign (-) if the number is negative + otherwise, the number
          is represented in decimal form as a Number including a
          decimal point with at least one digit before the decimal
          point and at least one digit after the decimal point,
          preceded by a minus sign (-) if the number is negative;
          there must be no leading zeros before the decimal point
          apart possibly from the one required digit immediately
          before the decimal point; beyond the one required digit
          after the decimal point there must be as many, but only as
          many, more digits as are needed to uniquely distinguish the
          number from all other IEEE 754 numeric values. - The
          boolean false value is converted to the string false. The
          boolean true value is converted to the string true.  If the
          argument is omitted, it defaults to a node-set with the
           context node as its only member. N)r2ZxmlXPathStringFunctionr)rr�rrr�xpathStringFunction�sz&xpathParserContext.xpathStringFunctioncCstj|j|�dS)aUImplement the string-length() XPath function number
          string-length(string?) The string-length returns the number
          of characters in the string (see [3.6 Strings]). If the
          argument is omitted, it defaults to the context node
          converted to a string, in other words the value of the
           context node. N)r2ZxmlXPathStringLengthFunctionr)rr�rrr�xpathStringLengthFunction�sz,xpathParserContext.xpathStringLengthFunctioncCstj|j�dS)z�Implement the subtraction operation on XPath objects: The
          numeric operators convert their operands to numbers as if
           by calling the number function. N)r2ZxmlXPathSubValuesr)rrrr�xpathSubValues�sz!xpathParserContext.xpathSubValuescCstj|j|�dS)a+Implement the substring-after() XPath function string
          substring-after(string, string) The substring-after
          function returns the substring of the first argument string
          that follows the first occurrence of the second argument
          string in the first argument string, or the empty stringi
          if the first argument string does not contain the second
          argument string. For example,
          substring-after("1999/04/01","/") returns 04/01, and
           substring-after("1999/04/01","19") returns 99/04/01. N)r2ZxmlXPathSubstringAfterFunctionr)rr�rrr�xpathSubstringAfterFunction�s
z.xpathParserContext.xpathSubstringAfterFunctioncCstj|j|�dS)a�Implement the substring-before() XPath function string
          substring-before(string, string) The substring-before
          function returns the substring of the first argument string
          that precedes the first occurrence of the second argument
          string in the first argument string, or the empty string if
          the first argument string does not contain the second
          argument string. For example,
           substring-before("1999/04/01","/") returns 1999. N)r2ZxmlXPathSubstringBeforeFunctionr)rr�rrr�xpathSubstringBeforeFunction�s	z/xpathParserContext.xpathSubstringBeforeFunctioncCstj|j|�dS)aImplement the substring() XPath function string
          substring(string, number, number?) The substring function
          returns the substring of the first argument starting at the
          position specified in the second argument with length
          specified in the third argument. For example,
          substring("12345",2,3) returns "234". If the third argument
          is not specified, it returns the substring starting at the
          position specified in the second argument and continuing to
          the end of the string. For example, substring("12345",2)
          returns "2345".  More precisely, each character in the
          string (see [3.6 Strings]) is considered to have a numeric
          position: the position of the first character is 1, the
          position of the second character is 2 and so on. The
          returned substring contains those characters for which the
          position of the character is greater than or equal to the
          second argument and, if the third argument is specified,
          less than the sum of the second and third arguments; the
          comparisons and addition used for the above follow the
          standard IEEE 754 rules. Thus: - substring("12345", 1.5,
          2.6) returns "234" - substring("12345", 0, 3) returns "12"
          - substring("12345", 0 div 0, 3) returns "" -
          substring("12345", 1, 0 div 0) returns "" -
          substring("12345", -42, 1 div 0) returns "12345" -
           substring("12345", -1 div 0, 1 div 0) returns "" N)r2ZxmlXPathSubstringFunctionr)rr�rrr�xpathSubstringFunction�sz)xpathParserContext.xpathSubstringFunctioncCstj|j|�dS)z�Implement the sum() XPath function number sum(node-set) The
          sum function returns the sum of the values of the nodes in
           the argument node-set. N)r2ZxmlXPathSumFunctionr)rr�rrr�xpathSumFunctionsz#xpathParserContext.xpathSumFunctioncCstj|j|�dS)a%Implement the translate() XPath function string
          translate(string, string, string) The translate function
          returns the first argument string with occurrences of
          characters in the second argument string replaced by the
          character at the corresponding position in the third
          argument string. For example, translate("bar","abc","ABC")
          returns the string BAr. If there is a character in the
          second argument string with no character at a corresponding
          position in the third argument string (because the second
          argument string is longer than the third argument string),
          then occurrences of that character in the first argument
          string are removed. For example,
           translate("--aaa--","abc-","ABC") N)r2ZxmlXPathTranslateFunctionr)rr�rrr�xpathTranslateFunctionsz)xpathParserContext.xpathTranslateFunctioncCstj|j|�dS)z3Implement the true() XPath function boolean true() N)r2ZxmlXPathTrueFunctionr)rr�rrr�xpathTrueFunctionsz$xpathParserContext.xpathTrueFunctioncCstj|j�dS)z�Implement the unary - operation on an XPath object The
          numeric operators convert their operands to numbers as if
           by calling the number function. N)r2ZxmlXPathValueFlipSignr)rrrr�xpathValueFlipSign sz%xpathParserContext.xpathValueFlipSigncCstj|j|||�dS)zFormats an error message. N)r2Z
xmlXPatherrorr)rr8rrCrrr�
xpatherror&szxpathParserContext.xpatherrorcCstj|j�dS)z�[8]   Predicate ::=   '[' PredicateExpr ']' [9]  
          PredicateExpr ::=   Expr  Evaluate a predicate as in
          xmlXPathEvalPredicate() but for a Location Set instead of a
           node set N)r2ZxmlXPtrEvalRangePredicater)rrrr�xpointerEvalRangePredicate.sz-xpathParserContext.xpointerEvalRangePredicatecCstj|j|�dS)z�Implement the range-to() XPointer function  Obsolete.
          range-to is not a real function but a special type of
           location step which is handled in xpath.c. N)r2ZxmlXPtrRangeToFunctionr)rr�rrr�xpointerRangeToFunction5sz*xpathParserContext.xpointerRangeToFunction)N)Arrrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr��s|
	




	r����r��	�
���
������������������� �!�"�#�$�%�&�'�(�)�*�+�,�-�.�@��/�0�1�2�3�4�5�6�7�8�9�:�;�<�=�>�?�A�B�C�D�E�F�G�H�I�J�K�L�M�N�O�P�Q�R�S�T�U�V�W�X�Y�Z�[�\�]�^�_�`�a�b�c�d�e�f�g�h�i�j�k�l�m�n�o������������i�i�i�i�i�i�i�i�i�i�i�i�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiii 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�iiiiiiiiii	i
ii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`iaibi�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�i�iiiiixiyizi{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�iiiiiiiiii	i
iii
iiiiiiii@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRirisitiuivi�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�iiiiiiiiii	i
iii
iiiiiiiiiiiiiiiiiii i!i"i#i$i%i&i'i(i)i*i+i,i-i.i/i0i1i2i3i4i5i6i7i8i9i:i;i<i=i>i?i@iAiBiCiDiEiFiGiHiIiJiKiLiMiNiOiPiQiRiSiTiUiViWiliminioi�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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�ipiqirisitiXi���ii ii ii@i�iiiii@r r (�r2�typesrr&rrrrrrrrr0r7r:rXr�r�r`r�r�ZPARSER_LOADDTDZPARSER_DEFAULTATTRSZPARSER_VALIDATEZPARSER_SUBST_ENTITIESZ PARSER_SEVERITY_VALIDITY_WARNINGZPARSER_SEVERITY_VALIDITY_ERRORZPARSER_SEVERITY_WARNINGZPARSER_SEVERITY_ERRORr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrr
rrr
rrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r,r-r.r/r0r1r2r3r4r5r6r7r8r9r=r>r?r@rArBrCrDrErFrHrIrJrKrLrMrNrOrPrQrRrSrTrUrWrXrYr\r]r^r_r`rarcrdrfrgrhrjrlrnrprqrrrsrtrurvrwrxryrzr|r}rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrrrrr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtr�rtr�rir�r	r�r�r�r�r�rmrkr�r{rrr�r'r,r�r�r�r�r	r�ZXLINK_SHOW_NONEZXLINK_SHOW_NEWZXLINK_SHOW_EMBEDZXLINK_SHOW_REPLACEZXML_RELAXNGP_NONEZXML_RELAXNGP_FREE_DOCZXML_RELAXNGP_CRNGZXML_BUFFER_ALLOC_DOUBLEITZXML_BUFFER_ALLOC_EXACTZXML_BUFFER_ALLOC_IMMUTABLEZXML_BUFFER_ALLOC_IOZXML_BUFFER_ALLOC_HYBRIDZXML_BUFFER_ALLOC_BOUNDEDZ$XML_PARSER_SEVERITY_VALIDITY_WARNINGZ"XML_PARSER_SEVERITY_VALIDITY_ERRORZXML_PARSER_SEVERITY_WARNINGZXML_PARSER_SEVERITY_ERRORZXML_ATTRIBUTE_NONEZXML_ATTRIBUTE_REQUIREDZXML_ATTRIBUTE_IMPLIEDZXML_ATTRIBUTE_FIXEDZXML_SCHEMAS_UNKNOWNZXML_SCHEMAS_STRINGZXML_SCHEMAS_NORMSTRINGZXML_SCHEMAS_DECIMALZXML_SCHEMAS_TIMEZXML_SCHEMAS_GDAYZXML_SCHEMAS_GMONTHZXML_SCHEMAS_GMONTHDAYZXML_SCHEMAS_GYEARZXML_SCHEMAS_GYEARMONTHZXML_SCHEMAS_DATEZXML_SCHEMAS_DATETIMEZXML_SCHEMAS_DURATIONZXML_SCHEMAS_FLOATZXML_SCHEMAS_DOUBLEZXML_SCHEMAS_BOOLEANZXML_SCHEMAS_TOKENZXML_SCHEMAS_LANGUAGEZXML_SCHEMAS_NMTOKENZXML_SCHEMAS_NMTOKENSZXML_SCHEMAS_NAMEZXML_SCHEMAS_QNAMEZXML_SCHEMAS_NCNAMEZXML_SCHEMAS_IDZXML_SCHEMAS_IDREFZXML_SCHEMAS_IDREFSZXML_SCHEMAS_ENTITYZXML_SCHEMAS_ENTITIESZXML_SCHEMAS_NOTATIONZXML_SCHEMAS_ANYURIZXML_SCHEMAS_INTEGERZXML_SCHEMAS_NPINTEGERZXML_SCHEMAS_NINTEGERZXML_SCHEMAS_NNINTEGERZXML_SCHEMAS_PINTEGERZXML_SCHEMAS_INTZXML_SCHEMAS_UINTZXML_SCHEMAS_LONGZXML_SCHEMAS_ULONGZXML_SCHEMAS_SHORTZXML_SCHEMAS_USHORTZXML_SCHEMAS_BYTEZXML_SCHEMAS_UBYTEZXML_SCHEMAS_HEXBINARYZXML_SCHEMAS_BASE64BINARYZXML_SCHEMAS_ANYTYPEZXML_SCHEMAS_ANYSIMPLETYPEZXML_PARSER_EOFZXML_PARSER_STARTZXML_PARSER_MISCZ
XML_PARSER_PIZXML_PARSER_DTDZXML_PARSER_PROLOGZXML_PARSER_COMMENTZXML_PARSER_START_TAGZXML_PARSER_CONTENTZXML_PARSER_CDATA_SECTIONZXML_PARSER_END_TAGZXML_PARSER_ENTITY_DECLZXML_PARSER_ENTITY_VALUEZXML_PARSER_ATTRIBUTE_VALUEZXML_PARSER_SYSTEM_LITERALZXML_PARSER_EPILOGZXML_PARSER_IGNOREZXML_PARSER_PUBLIC_LITERALZXML_INTERNAL_GENERAL_ENTITYZ"XML_EXTERNAL_GENERAL_PARSED_ENTITYZ$XML_EXTERNAL_GENERAL_UNPARSED_ENTITYZXML_INTERNAL_PARAMETER_ENTITYZXML_EXTERNAL_PARAMETER_ENTITYZXML_INTERNAL_PREDEFINED_ENTITYZXML_SAVE_FORMATZXML_SAVE_NO_DECLZXML_SAVE_NO_EMPTYZXML_SAVE_NO_XHTMLZXML_SAVE_XHTMLZXML_SAVE_AS_XMLZXML_SAVE_AS_HTMLZXML_SAVE_WSNONSIGZXML_PATTERN_DEFAULTZXML_PATTERN_XPATHZXML_PATTERN_XSSELZXML_PATTERN_XSFIELDZ
XML_ERR_OKZXML_ERR_INTERNAL_ERRORZXML_ERR_NO_MEMORYZXML_ERR_DOCUMENT_STARTZXML_ERR_DOCUMENT_EMPTYZXML_ERR_DOCUMENT_ENDZXML_ERR_INVALID_HEX_CHARREFZXML_ERR_INVALID_DEC_CHARREFZXML_ERR_INVALID_CHARREFZXML_ERR_INVALID_CHARZXML_ERR_CHARREF_AT_EOFZXML_ERR_CHARREF_IN_PROLOGZXML_ERR_CHARREF_IN_EPILOGZXML_ERR_CHARREF_IN_DTDZXML_ERR_ENTITYREF_AT_EOFZXML_ERR_ENTITYREF_IN_PROLOGZXML_ERR_ENTITYREF_IN_EPILOGZXML_ERR_ENTITYREF_IN_DTDZXML_ERR_PEREF_AT_EOFZXML_ERR_PEREF_IN_PROLOGZXML_ERR_PEREF_IN_EPILOGZXML_ERR_PEREF_IN_INT_SUBSETZXML_ERR_ENTITYREF_NO_NAMEZ!XML_ERR_ENTITYREF_SEMICOL_MISSINGZXML_ERR_PEREF_NO_NAMEZXML_ERR_PEREF_SEMICOL_MISSINGZXML_ERR_UNDECLARED_ENTITYZXML_WAR_UNDECLARED_ENTITYZXML_ERR_UNPARSED_ENTITYZXML_ERR_ENTITY_IS_EXTERNALZXML_ERR_ENTITY_IS_PARAMETERZXML_ERR_UNKNOWN_ENCODINGZXML_ERR_UNSUPPORTED_ENCODINGZXML_ERR_STRING_NOT_STARTEDZXML_ERR_STRING_NOT_CLOSEDZXML_ERR_NS_DECL_ERRORZXML_ERR_ENTITY_NOT_STARTEDZXML_ERR_ENTITY_NOT_FINISHEDZXML_ERR_LT_IN_ATTRIBUTEZXML_ERR_ATTRIBUTE_NOT_STARTEDZXML_ERR_ATTRIBUTE_NOT_FINISHEDZXML_ERR_ATTRIBUTE_WITHOUT_VALUEZXML_ERR_ATTRIBUTE_REDEFINEDZXML_ERR_LITERAL_NOT_STARTEDZXML_ERR_LITERAL_NOT_FINISHEDZXML_ERR_COMMENT_NOT_FINISHEDZXML_ERR_PI_NOT_STARTEDZXML_ERR_PI_NOT_FINISHEDZXML_ERR_NOTATION_NOT_STARTEDZXML_ERR_NOTATION_NOT_FINISHEDZXML_ERR_ATTLIST_NOT_STARTEDZXML_ERR_ATTLIST_NOT_FINISHEDZXML_ERR_MIXED_NOT_STARTEDZXML_ERR_MIXED_NOT_FINISHEDZXML_ERR_ELEMCONTENT_NOT_STARTEDZ XML_ERR_ELEMCONTENT_NOT_FINISHEDZXML_ERR_XMLDECL_NOT_STARTEDZXML_ERR_XMLDECL_NOT_FINISHEDZXML_ERR_CONDSEC_NOT_STARTEDZXML_ERR_CONDSEC_NOT_FINISHEDZXML_ERR_EXT_SUBSET_NOT_FINISHEDZXML_ERR_DOCTYPE_NOT_FINISHEDZXML_ERR_MISPLACED_CDATA_ENDZXML_ERR_CDATA_NOT_FINISHEDZXML_ERR_RESERVED_XML_NAMEZXML_ERR_SPACE_REQUIREDZXML_ERR_SEPARATOR_REQUIREDZXML_ERR_NMTOKEN_REQUIREDZXML_ERR_NAME_REQUIREDZXML_ERR_PCDATA_REQUIREDZXML_ERR_URI_REQUIREDZXML_ERR_PUBID_REQUIREDZXML_ERR_LT_REQUIREDZXML_ERR_GT_REQUIREDZXML_ERR_LTSLASH_REQUIREDZXML_ERR_EQUAL_REQUIREDZXML_ERR_TAG_NAME_MISMATCHZXML_ERR_TAG_NOT_FINISHEDZXML_ERR_STANDALONE_VALUEZXML_ERR_ENCODING_NAMEZXML_ERR_HYPHEN_IN_COMMENTZXML_ERR_INVALID_ENCODINGZXML_ERR_EXT_ENTITY_STANDALONEZXML_ERR_CONDSEC_INVALIDZXML_ERR_VALUE_REQUIREDZXML_ERR_NOT_WELL_BALANCEDZXML_ERR_EXTRA_CONTENTZXML_ERR_ENTITY_CHAR_ERRORZXML_ERR_ENTITY_PE_INTERNALZXML_ERR_ENTITY_LOOPZXML_ERR_ENTITY_BOUNDARYZXML_ERR_INVALID_URIZXML_ERR_URI_FRAGMENTZXML_WAR_CATALOG_PIZXML_ERR_NO_DTDZXML_ERR_CONDSEC_INVALID_KEYWORDZXML_ERR_VERSION_MISSINGZXML_WAR_UNKNOWN_VERSIONZXML_WAR_LANG_VALUEZXML_WAR_NS_URIZXML_WAR_NS_URI_RELATIVEZXML_ERR_MISSING_ENCODINGZXML_WAR_SPACE_VALUEZXML_ERR_NOT_STANDALONEZXML_ERR_ENTITY_PROCESSINGZXML_ERR_NOTATION_PROCESSINGZXML_WAR_NS_COLUMNZXML_WAR_ENTITY_REDEFINEDZXML_ERR_UNKNOWN_VERSIONZXML_ERR_VERSION_MISMATCHZXML_ERR_NAME_TOO_LONGZXML_ERR_USER_STOPZXML_NS_ERR_XML_NAMESPACEZXML_NS_ERR_UNDEFINED_NAMESPACEZXML_NS_ERR_QNAMEZXML_NS_ERR_ATTRIBUTE_REDEFINEDZXML_NS_ERR_EMPTYZXML_NS_ERR_COLONZXML_DTD_ATTRIBUTE_DEFAULTZXML_DTD_ATTRIBUTE_REDEFINEDZXML_DTD_ATTRIBUTE_VALUEZXML_DTD_CONTENT_ERRORZXML_DTD_CONTENT_MODELZXML_DTD_CONTENT_NOT_DETERMINISTZXML_DTD_DIFFERENT_PREFIXZXML_DTD_ELEM_DEFAULT_NAMESPACEZXML_DTD_ELEM_NAMESPACEZXML_DTD_ELEM_REDEFINEDZXML_DTD_EMPTY_NOTATIONZXML_DTD_ENTITY_TYPEZXML_DTD_ID_FIXEDZXML_DTD_ID_REDEFINEDZXML_DTD_ID_SUBSETZXML_DTD_INVALID_CHILDZXML_DTD_INVALID_DEFAULTZXML_DTD_LOAD_ERRORZXML_DTD_MISSING_ATTRIBUTEZXML_DTD_MIXED_CORRUPTZXML_DTD_MULTIPLE_IDZXML_DTD_NO_DOCZXML_DTD_NO_DTDZXML_DTD_NO_ELEM_NAMEZXML_DTD_NO_PREFIXZXML_DTD_NO_ROOTZXML_DTD_NOTATION_REDEFINEDZXML_DTD_NOTATION_VALUEZXML_DTD_NOT_EMPTYZXML_DTD_NOT_PCDATAZXML_DTD_NOT_STANDALONEZXML_DTD_ROOT_NAMEZXML_DTD_STANDALONE_WHITE_SPACEZXML_DTD_UNKNOWN_ATTRIBUTEZXML_DTD_UNKNOWN_ELEMZXML_DTD_UNKNOWN_ENTITYZXML_DTD_UNKNOWN_IDZXML_DTD_UNKNOWN_NOTATIONZXML_DTD_STANDALONE_DEFAULTEDZXML_DTD_XMLID_VALUEZXML_DTD_XMLID_TYPEZXML_DTD_DUP_TOKENZXML_HTML_STRUCURE_ERRORZXML_HTML_UNKNOWN_TAGZXML_RNGP_ANYNAME_ATTR_ANCESTORZXML_RNGP_ATTR_CONFLICTZXML_RNGP_ATTRIBUTE_CHILDRENZXML_RNGP_ATTRIBUTE_CONTENTZXML_RNGP_ATTRIBUTE_EMPTYZXML_RNGP_ATTRIBUTE_NOOPZXML_RNGP_CHOICE_CONTENTZXML_RNGP_CHOICE_EMPTYZXML_RNGP_CREATE_FAILUREZXML_RNGP_DATA_CONTENTZ"XML_RNGP_DEF_CHOICE_AND_INTERLEAVEZXML_RNGP_DEFINE_CREATE_FAILEDZXML_RNGP_DEFINE_EMPTYZXML_RNGP_DEFINE_MISSINGZXML_RNGP_DEFINE_NAME_MISSINGZXML_RNGP_ELEM_CONTENT_EMPTYZXML_RNGP_ELEM_CONTENT_ERRORZXML_RNGP_ELEMENT_EMPTYZXML_RNGP_ELEMENT_CONTENTZXML_RNGP_ELEMENT_NAMEZXML_RNGP_ELEMENT_NO_CONTENTZXML_RNGP_ELEM_TEXT_CONFLICTZXML_RNGP_EMPTYZXML_RNGP_EMPTY_CONSTRUCTZXML_RNGP_EMPTY_CONTENTZXML_RNGP_EMPTY_NOT_EMPTYZXML_RNGP_ERROR_TYPE_LIBZXML_RNGP_EXCEPT_EMPTYZXML_RNGP_EXCEPT_MISSINGZXML_RNGP_EXCEPT_MULTIPLEZXML_RNGP_EXCEPT_NO_CONTENTZXML_RNGP_EXTERNALREF_EMTPYZXML_RNGP_EXTERNAL_REF_FAILUREZXML_RNGP_EXTERNALREF_RECURSEZXML_RNGP_FORBIDDEN_ATTRIBUTEZXML_RNGP_FOREIGN_ELEMENTZXML_RNGP_GRAMMAR_CONTENTZXML_RNGP_GRAMMAR_EMPTYZXML_RNGP_GRAMMAR_MISSINGZXML_RNGP_GRAMMAR_NO_STARTZXML_RNGP_GROUP_ATTR_CONFLICTZXML_RNGP_HREF_ERRORZXML_RNGP_INCLUDE_EMPTYZXML_RNGP_INCLUDE_FAILUREZXML_RNGP_INCLUDE_RECURSEZXML_RNGP_INTERLEAVE_ADDZ!XML_RNGP_INTERLEAVE_CREATE_FAILEDZXML_RNGP_INTERLEAVE_EMPTYZXML_RNGP_INTERLEAVE_NO_CONTENTZXML_RNGP_INVALID_DEFINE_NAMEZXML_RNGP_INVALID_URIZXML_RNGP_INVALID_VALUEZXML_RNGP_MISSING_HREFZXML_RNGP_NAME_MISSINGZXML_RNGP_NEED_COMBINEZXML_RNGP_NOTALLOWED_NOT_EMPTYZXML_RNGP_NSNAME_ATTR_ANCESTORZXML_RNGP_NSNAME_NO_NSZXML_RNGP_PARAM_FORBIDDENZXML_RNGP_PARAM_NAME_MISSINGZ XML_RNGP_PARENTREF_CREATE_FAILEDZXML_RNGP_PARENTREF_NAME_INVALIDZXML_RNGP_PARENTREF_NO_NAMEZXML_RNGP_PARENTREF_NO_PARENTZXML_RNGP_PARENTREF_NOT_EMPTYZXML_RNGP_PARSE_ERRORZ#XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAMEZXML_RNGP_PAT_ATTR_ATTRZXML_RNGP_PAT_ATTR_ELEMZXML_RNGP_PAT_DATA_EXCEPT_ATTRZXML_RNGP_PAT_DATA_EXCEPT_ELEMZXML_RNGP_PAT_DATA_EXCEPT_EMPTYZXML_RNGP_PAT_DATA_EXCEPT_GROUPZ#XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVEZXML_RNGP_PAT_DATA_EXCEPT_LISTZ XML_RNGP_PAT_DATA_EXCEPT_ONEMOREZXML_RNGP_PAT_DATA_EXCEPT_REFZXML_RNGP_PAT_DATA_EXCEPT_TEXTZXML_RNGP_PAT_LIST_ATTRZXML_RNGP_PAT_LIST_ELEMZXML_RNGP_PAT_LIST_INTERLEAVEZXML_RNGP_PAT_LIST_LISTZXML_RNGP_PAT_LIST_REFZXML_RNGP_PAT_LIST_TEXTZ"XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAMEZ!XML_RNGP_PAT_NSNAME_EXCEPT_NSNAMEZXML_RNGP_PAT_ONEMORE_GROUP_ATTRZ$XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTRZXML_RNGP_PAT_START_ATTRZXML_RNGP_PAT_START_DATAZXML_RNGP_PAT_START_EMPTYZXML_RNGP_PAT_START_GROUPZXML_RNGP_PAT_START_INTERLEAVEZXML_RNGP_PAT_START_LISTZXML_RNGP_PAT_START_ONEMOREZXML_RNGP_PAT_START_TEXTZXML_RNGP_PAT_START_VALUEZXML_RNGP_PREFIX_UNDEFINEDZXML_RNGP_REF_CREATE_FAILEDZXML_RNGP_REF_CYCLEZXML_RNGP_REF_NAME_INVALIDZXML_RNGP_REF_NO_DEFZXML_RNGP_REF_NO_NAMEZXML_RNGP_REF_NOT_EMPTYZ$XML_RNGP_START_CHOICE_AND_INTERLEAVEZXML_RNGP_START_CONTENTZXML_RNGP_START_EMPTYZXML_RNGP_START_MISSINGZXML_RNGP_TEXT_EXPECTEDZXML_RNGP_TEXT_HAS_CHILDZXML_RNGP_TYPE_MISSINGZXML_RNGP_TYPE_NOT_FOUNDZXML_RNGP_TYPE_VALUEZXML_RNGP_UNKNOWN_ATTRIBUTEZXML_RNGP_UNKNOWN_COMBINEZXML_RNGP_UNKNOWN_CONSTRUCTZXML_RNGP_UNKNOWN_TYPE_LIBZXML_RNGP_URI_FRAGMENTZXML_RNGP_URI_NOT_ABSOLUTEZXML_RNGP_VALUE_EMPTYZXML_RNGP_VALUE_NO_CONTENTZXML_RNGP_XMLNS_NAMEZXML_RNGP_XML_NSZXML_XPATH_EXPRESSION_OKZXML_XPATH_NUMBER_ERRORZ"XML_XPATH_UNFINISHED_LITERAL_ERRORZXML_XPATH_START_LITERAL_ERRORZXML_XPATH_VARIABLE_REF_ERRORZXML_XPATH_UNDEF_VARIABLE_ERRORZ!XML_XPATH_INVALID_PREDICATE_ERRORZXML_XPATH_EXPR_ERRORZXML_XPATH_UNCLOSED_ERRORZXML_XPATH_UNKNOWN_FUNC_ERRORZXML_XPATH_INVALID_OPERANDZXML_XPATH_INVALID_TYPEZXML_XPATH_INVALID_ARITYZXML_XPATH_INVALID_CTXT_SIZEZXML_XPATH_INVALID_CTXT_POSITIONZXML_XPATH_MEMORY_ERRORZXML_XPTR_SYNTAX_ERRORZXML_XPTR_RESOURCE_ERRORZXML_XPTR_SUB_RESOURCE_ERRORZXML_XPATH_UNDEF_PREFIX_ERRORZXML_XPATH_ENCODING_ERRORZXML_XPATH_INVALID_CHAR_ERRORZXML_TREE_INVALID_HEXZXML_TREE_INVALID_DECZXML_TREE_UNTERMINATED_ENTITYZXML_TREE_NOT_UTF8ZXML_SAVE_NOT_UTF8ZXML_SAVE_CHAR_INVALIDZXML_SAVE_NO_DOCTYPEZXML_SAVE_UNKNOWN_ENCODINGZXML_REGEXP_COMPILE_ERRORZXML_IO_UNKNOWNZ
XML_IO_EACCESZ
XML_IO_EAGAINZXML_IO_EBADFZXML_IO_EBADMSGZXML_IO_EBUSYZXML_IO_ECANCELEDZ
XML_IO_ECHILDZXML_IO_EDEADLKZXML_IO_EDOMZ
XML_IO_EEXISTZ
XML_IO_EFAULTZXML_IO_EFBIGZXML_IO_EINPROGRESSZXML_IO_EINTRZ
XML_IO_EINVALZ
XML_IO_EIOZ
XML_IO_EISDIRZ
XML_IO_EMFILEZ
XML_IO_EMLINKZXML_IO_EMSGSIZEZXML_IO_ENAMETOOLONGZ
XML_IO_ENFILEZ
XML_IO_ENODEVZ
XML_IO_ENOENTZXML_IO_ENOEXECZ
XML_IO_ENOLCKZ
XML_IO_ENOMEMZ
XML_IO_ENOSPCZ
XML_IO_ENOSYSZXML_IO_ENOTDIRZXML_IO_ENOTEMPTYZXML_IO_ENOTSUPZ
XML_IO_ENOTTYZXML_IO_ENXIOZXML_IO_EPERMZXML_IO_EPIPEZ
XML_IO_ERANGEZXML_IO_EROFSZ
XML_IO_ESPIPEZXML_IO_ESRCHZXML_IO_ETIMEDOUTZXML_IO_EXDEVZXML_IO_NETWORK_ATTEMPTZXML_IO_ENCODERZXML_IO_FLUSHZXML_IO_WRITEZXML_IO_NO_INPUTZXML_IO_BUFFER_FULLZXML_IO_LOAD_ERRORZXML_IO_ENOTSOCKZXML_IO_EISCONNZXML_IO_ECONNREFUSEDZXML_IO_ENETUNREACHZXML_IO_EADDRINUSEZXML_IO_EALREADYZXML_IO_EAFNOSUPPORTZXML_XINCLUDE_RECURSIONZXML_XINCLUDE_PARSE_VALUEZ XML_XINCLUDE_ENTITY_DEF_MISMATCHZXML_XINCLUDE_NO_HREFZXML_XINCLUDE_NO_FALLBACKZXML_XINCLUDE_HREF_URIZXML_XINCLUDE_TEXT_FRAGMENTZXML_XINCLUDE_TEXT_DOCUMENTZXML_XINCLUDE_INVALID_CHARZXML_XINCLUDE_BUILD_FAILEDZXML_XINCLUDE_UNKNOWN_ENCODINGZXML_XINCLUDE_MULTIPLE_ROOTZXML_XINCLUDE_XPTR_FAILEDZXML_XINCLUDE_XPTR_RESULTZXML_XINCLUDE_INCLUDE_IN_INCLUDEZ!XML_XINCLUDE_FALLBACKS_IN_INCLUDEZ$XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDEZXML_XINCLUDE_DEPRECATED_NSZXML_XINCLUDE_FRAGMENT_IDZXML_CATALOG_MISSING_ATTRZXML_CATALOG_ENTRY_BROKENZXML_CATALOG_PREFER_VALUEZXML_CATALOG_NOT_CATALOGZXML_CATALOG_RECURSIONZXML_SCHEMAP_PREFIX_UNDEFINEDZ!XML_SCHEMAP_ATTRFORMDEFAULT_VALUEZ XML_SCHEMAP_ATTRGRP_NONAME_NOREFZXML_SCHEMAP_ATTR_NONAME_NOREFZ$XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREFZ!XML_SCHEMAP_ELEMFORMDEFAULT_VALUEZXML_SCHEMAP_ELEM_NONAME_NOREFZXML_SCHEMAP_EXTENSION_NO_BASEZXML_SCHEMAP_FACET_NO_VALUEZXML_SCHEMAP_FAILED_BUILD_IMPORTZXML_SCHEMAP_GROUP_NONAME_NOREFZ$XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URIZ"XML_SCHEMAP_IMPORT_REDEFINE_NSNAMEZ!XML_SCHEMAP_IMPORT_SCHEMA_NOT_URIZXML_SCHEMAP_INVALID_BOOLEANZXML_SCHEMAP_INVALID_ENUMZXML_SCHEMAP_INVALID_FACETZXML_SCHEMAP_INVALID_FACET_VALUEZXML_SCHEMAP_INVALID_MAXOCCURSZXML_SCHEMAP_INVALID_MINOCCURSZ#XML_SCHEMAP_INVALID_REF_AND_SUBTYPEZXML_SCHEMAP_INVALID_WHITE_SPACEZXML_SCHEMAP_NOATTR_NOREFZXML_SCHEMAP_NOTATION_NO_NAMEZXML_SCHEMAP_NOTYPE_NOREFZXML_SCHEMAP_REF_AND_SUBTYPEZ$XML_SCHEMAP_RESTRICTION_NONAME_NOREFZXML_SCHEMAP_SIMPLETYPE_NONAMEZXML_SCHEMAP_TYPE_AND_SUBTYPEZXML_SCHEMAP_UNKNOWN_ALL_CHILDZ&XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILDZXML_SCHEMAP_UNKNOWN_ATTR_CHILDZ!XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILDZ#XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUPZXML_SCHEMAP_UNKNOWN_BASE_TYPEZ XML_SCHEMAP_UNKNOWN_CHOICE_CHILDZ(XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILDZ%XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILDZXML_SCHEMAP_UNKNOWN_ELEM_CHILDZ#XML_SCHEMAP_UNKNOWN_EXTENSION_CHILDZXML_SCHEMAP_UNKNOWN_FACET_CHILDZXML_SCHEMAP_UNKNOWN_FACET_TYPEZXML_SCHEMAP_UNKNOWN_GROUP_CHILDZ XML_SCHEMAP_UNKNOWN_IMPORT_CHILDZXML_SCHEMAP_UNKNOWN_LIST_CHILDZ"XML_SCHEMAP_UNKNOWN_NOTATION_CHILDZ(XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILDZXML_SCHEMAP_UNKNOWN_REFZ%XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILDZ!XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILDZ"XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILDZ'XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILDZ$XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILDZXML_SCHEMAP_UNKNOWN_TYPEZXML_SCHEMAP_UNKNOWN_UNION_CHILDZXML_SCHEMAP_ELEM_DEFAULT_FIXEDZXML_SCHEMAP_REGEXP_INVALIDZXML_SCHEMAP_FAILED_LOADZXML_SCHEMAP_NOTHING_TO_PARSEZXML_SCHEMAP_NOROOTZXML_SCHEMAP_REDEFINED_GROUPZXML_SCHEMAP_REDEFINED_TYPEZXML_SCHEMAP_REDEFINED_ELEMENTZXML_SCHEMAP_REDEFINED_ATTRGROUPZXML_SCHEMAP_REDEFINED_ATTRZXML_SCHEMAP_REDEFINED_NOTATIONZXML_SCHEMAP_FAILED_PARSEZXML_SCHEMAP_UNKNOWN_PREFIXZXML_SCHEMAP_DEF_AND_PREFIXZ!XML_SCHEMAP_UNKNOWN_INCLUDE_CHILDZ"XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URIZ!XML_SCHEMAP_INCLUDE_SCHEMA_NO_URIZXML_SCHEMAP_NOT_SCHEMAZXML_SCHEMAP_UNKNOWN_MEMBER_TYPEZXML_SCHEMAP_INVALID_ATTR_USEZXML_SCHEMAP_RECURSIVEZ(XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPEZ$XML_SCHEMAP_INVALID_ATTR_COMBINATIONZ+XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATIONZ$XML_SCHEMAP_MISSING_SIMPLETYPE_CHILDZXML_SCHEMAP_INVALID_ATTR_NAMEZXML_SCHEMAP_REF_AND_CONTENTZXML_SCHEMAP_CT_PROPS_CORRECT_1ZXML_SCHEMAP_CT_PROPS_CORRECT_2ZXML_SCHEMAP_CT_PROPS_CORRECT_3ZXML_SCHEMAP_CT_PROPS_CORRECT_4ZXML_SCHEMAP_CT_PROPS_CORRECT_5Z'XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1Z+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1Z+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2Z)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2Z'XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3Z&XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBERZ(XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLEZ!XML_SCHEMAP_UNION_NOT_EXPRESSIBLEZXML_SCHEMAP_SRC_IMPORT_3_1ZXML_SCHEMAP_SRC_IMPORT_3_2Z)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1Z)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2Z)XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3ZXML_SCHEMAP_COS_CT_EXTENDS_1_3ZXML_SCHEMAV_NOROOTZXML_SCHEMAV_UNDECLAREDELEMZXML_SCHEMAV_NOTTOPLEVELZXML_SCHEMAV_MISSINGZXML_SCHEMAV_WRONGELEMZXML_SCHEMAV_NOTYPEZXML_SCHEMAV_NOROLLBACKZXML_SCHEMAV_ISABSTRACTZXML_SCHEMAV_NOTEMPTYZXML_SCHEMAV_ELEMCONTZXML_SCHEMAV_HAVEDEFAULTZXML_SCHEMAV_NOTNILLABLEZXML_SCHEMAV_EXTRACONTENTZXML_SCHEMAV_INVALIDATTRZXML_SCHEMAV_INVALIDELEMZXML_SCHEMAV_NOTDETERMINISTZXML_SCHEMAV_CONSTRUCTZXML_SCHEMAV_INTERNALZXML_SCHEMAV_NOTSIMPLEZXML_SCHEMAV_ATTRUNKNOWNZXML_SCHEMAV_ATTRINVALIDZXML_SCHEMAV_VALUEZXML_SCHEMAV_FACETZ$XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1Z$XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2Z$XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3ZXML_SCHEMAV_CVC_TYPE_3_1_1ZXML_SCHEMAV_CVC_TYPE_3_1_2ZXML_SCHEMAV_CVC_FACET_VALIDZXML_SCHEMAV_CVC_LENGTH_VALIDZXML_SCHEMAV_CVC_MINLENGTH_VALIDZXML_SCHEMAV_CVC_MAXLENGTH_VALIDZ"XML_SCHEMAV_CVC_MININCLUSIVE_VALIDZ"XML_SCHEMAV_CVC_MAXINCLUSIVE_VALIDZ"XML_SCHEMAV_CVC_MINEXCLUSIVE_VALIDZ"XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALIDZ!XML_SCHEMAV_CVC_TOTALDIGITS_VALIDZ$XML_SCHEMAV_CVC_FRACTIONDIGITS_VALIDZXML_SCHEMAV_CVC_PATTERN_VALIDZ!XML_SCHEMAV_CVC_ENUMERATION_VALIDZ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1Z XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2Z XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3Z XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4ZXML_SCHEMAV_CVC_ELT_1ZXML_SCHEMAV_CVC_ELT_2ZXML_SCHEMAV_CVC_ELT_3_1ZXML_SCHEMAV_CVC_ELT_3_2_1ZXML_SCHEMAV_CVC_ELT_3_2_2ZXML_SCHEMAV_CVC_ELT_4_1ZXML_SCHEMAV_CVC_ELT_4_2ZXML_SCHEMAV_CVC_ELT_4_3ZXML_SCHEMAV_CVC_ELT_5_1_1ZXML_SCHEMAV_CVC_ELT_5_1_2ZXML_SCHEMAV_CVC_ELT_5_2_1ZXML_SCHEMAV_CVC_ELT_5_2_2_1ZXML_SCHEMAV_CVC_ELT_5_2_2_2_1ZXML_SCHEMAV_CVC_ELT_5_2_2_2_2ZXML_SCHEMAV_CVC_ELT_6ZXML_SCHEMAV_CVC_ELT_7ZXML_SCHEMAV_CVC_ATTRIBUTE_1ZXML_SCHEMAV_CVC_ATTRIBUTE_2ZXML_SCHEMAV_CVC_ATTRIBUTE_3ZXML_SCHEMAV_CVC_ATTRIBUTE_4Z XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1Z"XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1Z"XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2ZXML_SCHEMAV_CVC_COMPLEX_TYPE_4Z XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1Z XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2ZXML_SCHEMAV_ELEMENT_CONTENTZ$XML_SCHEMAV_DOCUMENT_ELEMENT_MISSINGZXML_SCHEMAV_CVC_COMPLEX_TYPE_1ZXML_SCHEMAV_CVC_AUZXML_SCHEMAV_CVC_TYPE_1ZXML_SCHEMAV_CVC_TYPE_2ZXML_SCHEMAV_CVC_IDCZXML_SCHEMAV_CVC_WILDCARDZXML_SCHEMAV_MISCZXML_XPTR_UNKNOWN_SCHEMEZXML_XPTR_CHILDSEQ_STARTZXML_XPTR_EVAL_FAILEDZXML_XPTR_EXTRA_OBJECTSZXML_C14N_CREATE_CTXTZXML_C14N_REQUIRES_UTF8ZXML_C14N_CREATE_STACKZXML_C14N_INVALID_NODEZXML_C14N_UNKNOW_NODEZXML_C14N_RELATIVE_NAMESPACEZXML_FTP_PASV_ANSWERZXML_FTP_EPSV_ANSWERZ
XML_FTP_ACCNTZXML_FTP_URL_SYNTAXZXML_HTTP_URL_SYNTAXZXML_HTTP_USE_IPZXML_HTTP_UNKNOWN_HOSTZXML_SCHEMAP_SRC_SIMPLE_TYPE_1ZXML_SCHEMAP_SRC_SIMPLE_TYPE_2ZXML_SCHEMAP_SRC_SIMPLE_TYPE_3ZXML_SCHEMAP_SRC_SIMPLE_TYPE_4ZXML_SCHEMAP_SRC_RESOLVEZ.XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPEZ+XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPEZ0XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPESZXML_SCHEMAP_ST_PROPS_CORRECT_1ZXML_SCHEMAP_ST_PROPS_CORRECT_2ZXML_SCHEMAP_ST_PROPS_CORRECT_3Z XML_SCHEMAP_COS_ST_RESTRICTS_1_1Z XML_SCHEMAP_COS_ST_RESTRICTS_1_2Z"XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1Z"XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2Z XML_SCHEMAP_COS_ST_RESTRICTS_2_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4Z$XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5Z XML_SCHEMAP_COS_ST_RESTRICTS_3_1Z"XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4Z$XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5Z!XML_SCHEMAP_COS_ST_DERIVED_OK_2_1Z!XML_SCHEMAP_COS_ST_DERIVED_OK_2_2Z XML_SCHEMAP_S4S_ELEM_NOT_ALLOWEDZXML_SCHEMAP_S4S_ELEM_MISSINGZ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWEDZXML_SCHEMAP_S4S_ATTR_MISSINGZ"XML_SCHEMAP_S4S_ATTR_INVALID_VALUEZXML_SCHEMAP_SRC_ELEMENT_1ZXML_SCHEMAP_SRC_ELEMENT_2_1ZXML_SCHEMAP_SRC_ELEMENT_2_2ZXML_SCHEMAP_SRC_ELEMENT_3ZXML_SCHEMAP_P_PROPS_CORRECT_1ZXML_SCHEMAP_P_PROPS_CORRECT_2_1ZXML_SCHEMAP_P_PROPS_CORRECT_2_2ZXML_SCHEMAP_E_PROPS_CORRECT_2ZXML_SCHEMAP_E_PROPS_CORRECT_3ZXML_SCHEMAP_E_PROPS_CORRECT_4ZXML_SCHEMAP_E_PROPS_CORRECT_5ZXML_SCHEMAP_E_PROPS_CORRECT_6ZXML_SCHEMAP_SRC_INCLUDEZXML_SCHEMAP_SRC_ATTRIBUTE_1ZXML_SCHEMAP_SRC_ATTRIBUTE_2ZXML_SCHEMAP_SRC_ATTRIBUTE_3_1ZXML_SCHEMAP_SRC_ATTRIBUTE_3_2ZXML_SCHEMAP_SRC_ATTRIBUTE_4ZXML_SCHEMAP_NO_XMLNSZXML_SCHEMAP_NO_XSIZXML_SCHEMAP_COS_VALID_DEFAULT_1Z!XML_SCHEMAP_COS_VALID_DEFAULT_2_1Z#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1Z#XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2ZXML_SCHEMAP_CVC_SIMPLE_TYPEZXML_SCHEMAP_COS_CT_EXTENDS_1_1ZXML_SCHEMAP_SRC_IMPORT_1_1ZXML_SCHEMAP_SRC_IMPORT_1_2ZXML_SCHEMAP_SRC_IMPORT_2ZXML_SCHEMAP_SRC_IMPORT_2_1ZXML_SCHEMAP_SRC_IMPORT_2_2ZXML_SCHEMAP_INTERNALZXML_SCHEMAP_NOT_DETERMINISTICZ!XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1Z!XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2Z!XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3ZXML_SCHEMAP_MG_PROPS_CORRECT_1ZXML_SCHEMAP_MG_PROPS_CORRECT_2ZXML_SCHEMAP_SRC_CT_1Z+XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3ZXML_SCHEMAP_AU_PROPS_CORRECT_2ZXML_SCHEMAP_A_PROPS_CORRECT_2ZXML_SCHEMAP_C_PROPS_CORRECTZXML_SCHEMAP_SRC_REDEFINEZXML_SCHEMAP_SRC_IMPORTZXML_SCHEMAP_WARN_SKIP_SCHEMAZ!XML_SCHEMAP_WARN_UNLOCATED_SCHEMAZ!XML_SCHEMAP_WARN_ATTR_REDECL_PROHZ$XML_SCHEMAP_WARN_ATTR_POINTLESS_PROHZXML_SCHEMAP_AG_PROPS_CORRECTZXML_SCHEMAP_COS_CT_EXTENDS_1_2ZXML_SCHEMAP_AU_PROPS_CORRECTZXML_SCHEMAP_A_PROPS_CORRECT_3ZXML_SCHEMAP_COS_ALL_LIMITEDZXML_SCHEMATRONV_ASSERTZXML_SCHEMATRONV_REPORTZXML_MODULE_OPENZXML_MODULE_CLOSEZXML_CHECK_FOUND_ELEMENTZXML_CHECK_FOUND_ATTRIBUTEZXML_CHECK_FOUND_TEXTZXML_CHECK_FOUND_CDATAZXML_CHECK_FOUND_ENTITYREFZXML_CHECK_FOUND_ENTITYZXML_CHECK_FOUND_PIZXML_CHECK_FOUND_COMMENTZXML_CHECK_FOUND_DOCTYPEZXML_CHECK_FOUND_FRAGMENTZXML_CHECK_FOUND_NOTATIONZXML_CHECK_UNKNOWN_NODEZXML_CHECK_ENTITY_TYPEZXML_CHECK_NO_PARENTZXML_CHECK_NO_DOCZXML_CHECK_NO_NAMEZXML_CHECK_NO_ELEMZXML_CHECK_WRONG_DOCZXML_CHECK_NO_PREVZXML_CHECK_WRONG_PREVZXML_CHECK_NO_NEXTZXML_CHECK_WRONG_NEXTZXML_CHECK_NOT_DTDZXML_CHECK_NOT_ATTRZXML_CHECK_NOT_ATTR_DECLZXML_CHECK_NOT_ELEM_DECLZXML_CHECK_NOT_ENTITY_DECLZXML_CHECK_NOT_NS_DECLZXML_CHECK_NO_HREFZXML_CHECK_WRONG_PARENTZXML_CHECK_NS_SCOPEZXML_CHECK_NS_ANCESTORZXML_CHECK_NOT_UTF8ZXML_CHECK_NO_DICTZXML_CHECK_NOT_NCNAMEZXML_CHECK_OUTSIDE_DICTZXML_CHECK_WRONG_NAMEZXML_CHECK_NAME_NOT_NULLZXML_I18N_NO_NAMEZXML_I18N_NO_HANDLERZXML_I18N_EXCESS_HANDLERZXML_I18N_CONV_FAILEDZXML_I18N_NO_OUTPUTZXML_BUF_OVERFLOWZ
XML_EXP_EMPTYZXML_EXP_FORBIDZXML_EXP_ATOMZXML_EXP_SEQZ
XML_EXP_ORZ
XML_EXP_COUNTZXML_ELEMENT_CONTENT_PCDATAZXML_ELEMENT_CONTENT_ELEMENTZXML_ELEMENT_CONTENT_SEQZXML_ELEMENT_CONTENT_ORZXML_PARSER_LOADDTDZXML_PARSER_DEFAULTATTRSZXML_PARSER_VALIDATEZXML_PARSER_SUBST_ENTITIESZXML_READER_TYPE_NONEZXML_READER_TYPE_ELEMENTZXML_READER_TYPE_ATTRIBUTEZXML_READER_TYPE_TEXTZXML_READER_TYPE_CDATAZ XML_READER_TYPE_ENTITY_REFERENCEZXML_READER_TYPE_ENTITYZ&XML_READER_TYPE_PROCESSING_INSTRUCTIONZXML_READER_TYPE_COMMENTZXML_READER_TYPE_DOCUMENTZXML_READER_TYPE_DOCUMENT_TYPEZ!XML_READER_TYPE_DOCUMENT_FRAGMENTZXML_READER_TYPE_NOTATIONZXML_READER_TYPE_WHITESPACEZ&XML_READER_TYPE_SIGNIFICANT_WHITESPACEZXML_READER_TYPE_END_ELEMENTZXML_READER_TYPE_END_ENTITYZXML_READER_TYPE_XML_DECLARATIONZXML_CATA_PREFER_NONEZXML_CATA_PREFER_PUBLICZXML_CATA_PREFER_SYSTEMZXML_ELEMENT_NODEZXML_ATTRIBUTE_NODEZ
XML_TEXT_NODEZXML_CDATA_SECTION_NODEZXML_ENTITY_REF_NODEZXML_ENTITY_NODEZXML_PI_NODEZXML_COMMENT_NODEZXML_DOCUMENT_NODEZXML_DOCUMENT_TYPE_NODEZXML_DOCUMENT_FRAG_NODEZXML_NOTATION_NODEZXML_HTML_DOCUMENT_NODEZXML_DTD_NODEZXML_ELEMENT_DECLZXML_ATTRIBUTE_DECLZXML_ENTITY_DECLZXML_NAMESPACE_DECLZXML_XINCLUDE_STARTZXML_XINCLUDE_ENDZXML_DOCB_DOCUMENT_NODEZXLINK_ACTUATE_NONEZXLINK_ACTUATE_AUTOZXLINK_ACTUATE_ONREQUESTZXML_WITH_THREADZ
XML_WITH_TREEZXML_WITH_OUTPUTZ
XML_WITH_PUSHZXML_WITH_READERZXML_WITH_PATTERNZXML_WITH_WRITERZ
XML_WITH_SAX1ZXML_WITH_FTPZ
XML_WITH_HTTPZXML_WITH_VALIDZ
XML_WITH_HTMLZXML_WITH_LEGACYZ
XML_WITH_C14NZXML_WITH_CATALOGZXML_WITH_XPATHZ
XML_WITH_XPTRZXML_WITH_XINCLUDEZXML_WITH_ICONVZXML_WITH_ISO8859XZXML_WITH_UNICODEZXML_WITH_REGEXPZXML_WITH_AUTOMATAZ
XML_WITH_EXPRZXML_WITH_SCHEMASZXML_WITH_SCHEMATRONZXML_WITH_MODULESZXML_WITH_DEBUGZXML_WITH_DEBUG_MEMZXML_WITH_DEBUG_RUNZ
XML_WITH_ZLIBZXML_WITH_ICUZ
XML_WITH_LZMAZ
XML_WITH_NONEZXML_ELEMENT_CONTENT_ONCEZXML_ELEMENT_CONTENT_OPTZXML_ELEMENT_CONTENT_MULTZXML_ELEMENT_CONTENT_PLUSZXPATH_EXPRESSION_OKZXPATH_NUMBER_ERRORZXPATH_UNFINISHED_LITERAL_ERRORZXPATH_START_LITERAL_ERRORZXPATH_VARIABLE_REF_ERRORZXPATH_UNDEF_VARIABLE_ERRORZXPATH_INVALID_PREDICATE_ERRORZXPATH_EXPR_ERRORZXPATH_UNCLOSED_ERRORZXPATH_UNKNOWN_FUNC_ERRORZXPATH_INVALID_OPERANDZXPATH_INVALID_TYPEZXPATH_INVALID_ARITYZXPATH_INVALID_CTXT_SIZEZXPATH_INVALID_CTXT_POSITIONZXPATH_MEMORY_ERRORZXPTR_SYNTAX_ERRORZXPTR_RESOURCE_ERRORZXPTR_SUB_RESOURCE_ERRORZXPATH_UNDEF_PREFIX_ERRORZXPATH_ENCODING_ERRORZXPATH_INVALID_CHAR_ERRORZXPATH_INVALID_CTXTZXPATH_STACK_ERRORZXPATH_FORBID_VARIABLE_ERRORZXML_TEXTREADER_MODE_INITIALZXML_TEXTREADER_MODE_INTERACTIVEZXML_TEXTREADER_MODE_ERRORZXML_TEXTREADER_MODE_EOFZXML_TEXTREADER_MODE_CLOSEDZXML_TEXTREADER_MODE_READINGZXML_ERR_NONEZXML_ERR_WARNINGZ
XML_ERR_ERRORZ
XML_ERR_FATALZXML_CHAR_ENCODING_ERRORZXML_CHAR_ENCODING_NONEZXML_CHAR_ENCODING_UTF8ZXML_CHAR_ENCODING_UTF16LEZXML_CHAR_ENCODING_UTF16BEZXML_CHAR_ENCODING_UCS4LEZXML_CHAR_ENCODING_UCS4BEZXML_CHAR_ENCODING_EBCDICZXML_CHAR_ENCODING_UCS4_2143ZXML_CHAR_ENCODING_UCS4_3412ZXML_CHAR_ENCODING_UCS2ZXML_CHAR_ENCODING_8859_1ZXML_CHAR_ENCODING_8859_2ZXML_CHAR_ENCODING_8859_3ZXML_CHAR_ENCODING_8859_4ZXML_CHAR_ENCODING_8859_5ZXML_CHAR_ENCODING_8859_6ZXML_CHAR_ENCODING_8859_7ZXML_CHAR_ENCODING_8859_8ZXML_CHAR_ENCODING_8859_9ZXML_CHAR_ENCODING_2022_JPZXML_CHAR_ENCODING_SHIFT_JISZXML_CHAR_ENCODING_EUC_JPZXML_CHAR_ENCODING_ASCIIZ
XML_FROM_NONEZXML_FROM_PARSERZ
XML_FROM_TREEZXML_FROM_NAMESPACEZXML_FROM_DTDZ
XML_FROM_HTMLZXML_FROM_MEMORYZXML_FROM_OUTPUTZXML_FROM_IOZXML_FROM_FTPZ
XML_FROM_HTTPZXML_FROM_XINCLUDEZXML_FROM_XPATHZXML_FROM_XPOINTERZXML_FROM_REGEXPZXML_FROM_DATATYPEZXML_FROM_SCHEMASPZXML_FROM_SCHEMASVZXML_FROM_RELAXNGPZXML_FROM_RELAXNGVZXML_FROM_CATALOGZ
XML_FROM_C14NZ
XML_FROM_XSLTZXML_FROM_VALIDZXML_FROM_CHECKZXML_FROM_WRITERZXML_FROM_MODULEZ
XML_FROM_I18NZXML_FROM_SCHEMATRONVZXML_FROM_BUFFERZXML_FROM_URIZHTML_NAZHTML_INVALIDZHTML_DEPRECATEDZ
HTML_VALIDZ
HTML_REQUIREDZXML_SCHEMA_VAL_VC_I_CREATEZXML_SCHEMA_WHITESPACE_UNKNOWNZXML_SCHEMA_WHITESPACE_PRESERVEZXML_SCHEMA_WHITESPACE_REPLACEZXML_SCHEMA_WHITESPACE_COLLAPSEZHTML_PARSE_RECOVERZHTML_PARSE_NODEFDTDZHTML_PARSE_NOERRORZHTML_PARSE_NOWARNINGZHTML_PARSE_PEDANTICZHTML_PARSE_NOBLANKSZHTML_PARSE_NONETZHTML_PARSE_NOIMPLIEDZHTML_PARSE_COMPACTZHTML_PARSE_IGNORE_ENCZXML_RELAXNG_OKZXML_RELAXNG_ERR_MEMORYZXML_RELAXNG_ERR_TYPEZXML_RELAXNG_ERR_TYPEVALZXML_RELAXNG_ERR_DUPIDZXML_RELAXNG_ERR_TYPECMPZXML_RELAXNG_ERR_NOSTATEZXML_RELAXNG_ERR_NODEFINEZXML_RELAXNG_ERR_LISTEXTRAZXML_RELAXNG_ERR_LISTEMPTYZXML_RELAXNG_ERR_INTERNODATAZXML_RELAXNG_ERR_INTERSEQZXML_RELAXNG_ERR_INTEREXTRAZXML_RELAXNG_ERR_ELEMNAMEZXML_RELAXNG_ERR_ATTRNAMEZXML_RELAXNG_ERR_ELEMNONSZXML_RELAXNG_ERR_ATTRNONSZXML_RELAXNG_ERR_ELEMWRONGNSZXML_RELAXNG_ERR_ATTRWRONGNSZXML_RELAXNG_ERR_ELEMEXTRANSZXML_RELAXNG_ERR_ATTREXTRANSZXML_RELAXNG_ERR_ELEMNOTEMPTYZXML_RELAXNG_ERR_NOELEMZXML_RELAXNG_ERR_NOTELEMZXML_RELAXNG_ERR_ATTRVALIDZXML_RELAXNG_ERR_CONTENTVALIDZXML_RELAXNG_ERR_EXTRACONTENTZXML_RELAXNG_ERR_INVALIDATTRZXML_RELAXNG_ERR_DATAELEMZXML_RELAXNG_ERR_VALELEMZXML_RELAXNG_ERR_LISTELEMZXML_RELAXNG_ERR_DATATYPEZXML_RELAXNG_ERR_VALUEZXML_RELAXNG_ERR_LISTZXML_RELAXNG_ERR_NOGRAMMARZXML_RELAXNG_ERR_EXTRADATAZXML_RELAXNG_ERR_LACKDATAZXML_RELAXNG_ERR_INTERNALZXML_RELAXNG_ERR_ELEMWRONGZXML_RELAXNG_ERR_TEXTWRONGZXML_CATA_ALLOW_NONEZXML_CATA_ALLOW_GLOBALZXML_CATA_ALLOW_DOCUMENTZXML_CATA_ALLOW_ALLZXML_ATTRIBUTE_CDATAZXML_ATTRIBUTE_IDZXML_ATTRIBUTE_IDREFZXML_ATTRIBUTE_IDREFSZXML_ATTRIBUTE_ENTITYZXML_ATTRIBUTE_ENTITIESZXML_ATTRIBUTE_NMTOKENZXML_ATTRIBUTE_NMTOKENSZXML_ATTRIBUTE_ENUMERATIONZXML_ATTRIBUTE_NOTATIONZXML_SCHEMATRON_OUT_QUIETZXML_SCHEMATRON_OUT_TEXTZXML_SCHEMATRON_OUT_XMLZXML_SCHEMATRON_OUT_ERRORZXML_SCHEMATRON_OUT_FILEZXML_SCHEMATRON_OUT_BUFFERZXML_SCHEMATRON_OUT_IOZXML_SCHEMA_CONTENT_UNKNOWNZXML_SCHEMA_CONTENT_EMPTYZXML_SCHEMA_CONTENT_ELEMENTSZXML_SCHEMA_CONTENT_MIXEDZXML_SCHEMA_CONTENT_SIMPLEZ$XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTSZXML_SCHEMA_CONTENT_BASICZXML_SCHEMA_CONTENT_ANYZXML_SCHEMA_TYPE_BASICZXML_SCHEMA_TYPE_ANYZXML_SCHEMA_TYPE_FACETZXML_SCHEMA_TYPE_SIMPLEZXML_SCHEMA_TYPE_COMPLEXZXML_SCHEMA_TYPE_SEQUENCEZXML_SCHEMA_TYPE_CHOICEZXML_SCHEMA_TYPE_ALLZXML_SCHEMA_TYPE_SIMPLE_CONTENTZXML_SCHEMA_TYPE_COMPLEX_CONTENTZXML_SCHEMA_TYPE_URZXML_SCHEMA_TYPE_RESTRICTIONZXML_SCHEMA_TYPE_EXTENSIONZXML_SCHEMA_TYPE_ELEMENTZXML_SCHEMA_TYPE_ATTRIBUTEZXML_SCHEMA_TYPE_ATTRIBUTEGROUPZXML_SCHEMA_TYPE_GROUPZXML_SCHEMA_TYPE_NOTATIONZXML_SCHEMA_TYPE_LISTZXML_SCHEMA_TYPE_UNIONZXML_SCHEMA_TYPE_ANY_ATTRIBUTEZXML_SCHEMA_TYPE_IDC_UNIQUEZXML_SCHEMA_TYPE_IDC_KEYZXML_SCHEMA_TYPE_IDC_KEYREFZXML_SCHEMA_TYPE_PARTICLEZXML_SCHEMA_TYPE_ATTRIBUTE_USEZXML_SCHEMA_FACET_MININCLUSIVEZXML_SCHEMA_FACET_MINEXCLUSIVEZXML_SCHEMA_FACET_MAXINCLUSIVEZXML_SCHEMA_FACET_MAXEXCLUSIVEZXML_SCHEMA_FACET_TOTALDIGITSZXML_SCHEMA_FACET_FRACTIONDIGITSZXML_SCHEMA_FACET_PATTERNZXML_SCHEMA_FACET_ENUMERATIONZXML_SCHEMA_FACET_WHITESPACEZXML_SCHEMA_FACET_LENGTHZXML_SCHEMA_FACET_MAXLENGTHZXML_SCHEMA_FACET_MINLENGTHZXML_SCHEMA_EXTRA_QNAMEREFZ XML_SCHEMA_EXTRA_ATTR_USE_PROHIBZXML_MODULE_LAZYZXML_MODULE_LOCALZXML_PARSE_UNKNOWNZ
XML_PARSE_DOMZ
XML_PARSE_SAXZXML_PARSE_PUSH_DOMZXML_PARSE_PUSH_SAXZXML_PARSE_READERZXML_C14N_1_0ZXML_C14N_EXCLUSIVE_1_0ZXML_C14N_1_1ZXML_PARSE_RECOVERZXML_PARSE_NOENTZXML_PARSE_DTDLOADZXML_PARSE_DTDATTRZXML_PARSE_DTDVALIDZXML_PARSE_NOERRORZXML_PARSE_NOWARNINGZXML_PARSE_PEDANTICZXML_PARSE_NOBLANKSZXML_PARSE_SAX1ZXML_PARSE_XINCLUDEZXML_PARSE_NONETZXML_PARSE_NODICTZXML_PARSE_NSCLEANZXML_PARSE_NOCDATAZXML_PARSE_NOXINCNODEZXML_PARSE_COMPACTZXML_PARSE_OLD10ZXML_PARSE_NOBASEFIXZXML_PARSE_HUGEZXML_PARSE_OLDSAXZXML_PARSE_IGNORE_ENCZXML_PARSE_BIG_LINESZXML_ELEMENT_TYPE_UNDEFINEDZXML_ELEMENT_TYPE_EMPTYZXML_ELEMENT_TYPE_ANYZXML_ELEMENT_TYPE_MIXEDZXML_ELEMENT_TYPE_ELEMENTZXML_DOC_WELLFORMEDZXML_DOC_NSVALIDZ
XML_DOC_OLD10ZXML_DOC_DTDVALIDZXML_DOC_XINCLUDEZXML_DOC_USERBUILTZXML_DOC_INTERNALZXML_DOC_HTMLZXLINK_TYPE_NONEZXLINK_TYPE_SIMPLEZXLINK_TYPE_EXTENDEDZXLINK_TYPE_EXTENDED_SETZXPATH_UNDEFINEDZ
XPATH_NODESETZ
XPATH_BOOLEANZXPATH_NUMBERZXPATH_STRINGZXPATH_POINTZXPATH_RANGEZXPATH_LOCATIONSETZXPATH_USERSZXPATH_XSLT_TREEZXML_SCHEMAS_ERR_OKZXML_SCHEMAS_ERR_NOROOTZXML_SCHEMAS_ERR_UNDECLAREDELEMZXML_SCHEMAS_ERR_NOTTOPLEVELZXML_SCHEMAS_ERR_MISSINGZXML_SCHEMAS_ERR_WRONGELEMZXML_SCHEMAS_ERR_NOTYPEZXML_SCHEMAS_ERR_NOROLLBACKZXML_SCHEMAS_ERR_ISABSTRACTZXML_SCHEMAS_ERR_NOTEMPTYZXML_SCHEMAS_ERR_ELEMCONTZXML_SCHEMAS_ERR_HAVEDEFAULTZXML_SCHEMAS_ERR_NOTNILLABLEZXML_SCHEMAS_ERR_EXTRACONTENTZXML_SCHEMAS_ERR_INVALIDATTRZXML_SCHEMAS_ERR_INVALIDELEMZXML_SCHEMAS_ERR_NOTDETERMINISTZXML_SCHEMAS_ERR_CONSTRUCTZXML_SCHEMAS_ERR_INTERNALZXML_SCHEMAS_ERR_NOTSIMPLEZXML_SCHEMAS_ERR_ATTRUNKNOWNZXML_SCHEMAS_ERR_ATTRINVALIDZXML_SCHEMAS_ERR_VALUEZXML_SCHEMAS_ERR_FACETZXML_SCHEMAS_ERR_ZXML_SCHEMAS_ERR_XXXrrrr�<module>s>
	+/i


#		
			


	"	

				

			
	95N	<B	3-b:.F*M;z0%E

?>