403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/pandas/tests/io/xml/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pandas/tests/io/xml/__pycache__/test_xml.cpython-312.pyc
�

0	�gI��
�n�ddlmZddlmZmZddlmZddlZddlm	Z	ddl
mZddlm
Z
ddlmZddlZddlZdd	lmZdd
lmZmZddlmcmZddlZddlmZmZm Z ddl!m"Z#ddl$m%Z%m&Z&dd
l'm(Z(ddl)m*Z*ddl+m,Z,egd�gd�dejZdgd��Z.dZ/dZ0edddddd�dddddd�dddddd�dddddd�d d d d d d�d!d"d#d$d%d�d&��Z1d'�Z2ejfd(d)g�*�d+��Z4ejfejjd,ejld,��-�d.g�*�d/��Z7d0�Z8d1�Z9d2�Z:ejvjxejvjzd3���Z>d4�Z?d5�Z@d6�ZAd7�ZBd8�ZCd9�ZDd:�ZEejvj�d;d<d=g�d>��ZGejvj�d;d<d=g�d?��ZHd@�ZIejvjxejvjzdA���ZJejvjxejvjzdB���ZKdC�ZLdD�ZMdE�ZNdF�ZOdG�ZPdH�ZQdI�ZRdJ�ZSdK�ZTdL�ZUdM�ZVejvj�dNd<dg�dO��ZWdP�ZXdQ�ZYdR�ZZdS�Z[dT�Z\dU�Z]dV�Z^dW�Z_dX�Z`dY�ZadZ�Zbd[�Zcd\�Zdd]�Zed^�Zfd_�Zgd`�Zhda�Zidb�Zjdc�Zkej�d,�dd��Zmde�Zndf�Zodg�Zpdh�Zqdi�Zrdj�Zsdk�Ztdl�Zudm�Zvdn�Zwdo�Zxdp�Zydq�Zzejvj�d;d<d=g�dr��Z{ds�Z|dt�Z}ejvjxejvjzdu���Z~dv�Zdw�Z�dx�Z�dy�Z�dz�Z�d{�Z�d|�Z�d}�Z�d~�Z�d�Z�d��Z�d��Z�d��Z�ejvjxejvjzd����Z�d��Z�d��Z�y)��)�annotations)�BytesIO�StringIO)�	LZMAErrorN)�	ReadError)�	HTTPError)�
ParseError)�
BadZipFile)�import_optional_dependency)�EmptyDataError�ParserError)�NA�	DataFrame�Series)�ArrowStringArray�StringArray)�ArrowStringArrayNumpySemantics)�
get_handle)�read_xml��square�circle�triangle��hr�����shape�degrees�sidesa[<?xml version='1.0' encoding='utf-8'?>
<data xmlns="http://example.com">
  <row>
    <shape>square</shape>
    <degrees>360</degrees>
    <sides>4</sides>
  </row>
  <row>
    <shape>circle</shape>
    <degrees>360</degrees>
    <sides/>
  </row>
  <row>
    <shape>triangle</shape>
    <degrees>180</degrees>
    <sides>3</sides>
  </row>
</data>a�<?xml version='1.0' encoding='utf-8'?>
<doc:data xmlns:doc="http://example.com">
  <doc:row>
    <doc:shape>square</doc:shape>
    <doc:degrees>360</doc:degrees>
    <doc:sides>4.0</doc:sides>
  </doc:row>
  <doc:row>
    <doc:shape>circle</doc:shape>
    <doc:degrees>360</doc:degrees>
    <doc:sides/>
  </doc:row>
  <doc:row>
    <doc:shape>triangle</doc:shape>
    <doc:degrees>180</doc:degrees>
    <doc:sides>3.0</doc:sides>
  </doc:row>
</doc:data>�ID_00001�ID_00002�ID_00003�ID_00004�ID_00005�r��rrzBlue Line (Forest Park)zRed, Purple Linez#LineStyle01�clampedToGroundz�-87.77678526964958,41.8708863930319,0 -87.77826234150609,41.87097820122218,0 -87.78251583439344,41.87130129991005,0 -87.78418294588424,41.87145055520308,0 -87.7872369165933,41.8717239119163,0 -87.79160214925886,41.87210797280065,0a\-87.65758750947528,41.96427269188822,0 -87.65802133507393,41.96581929055245,0 -87.65819033925305,41.96621846093642,0 -87.6583189819129,41.96650362897086,0 -87.65835858701473,41.96669002089185,0 -87.65838428411853,41.96688150295095,0 -87.65842208882658,41.96745896091846,0 -87.65846556843937,41.9683761425439,0 -87.65849296214573,41.96913893870342,0a�-87.65492939166126,41.95377494531437,0 -87.65557043199591,41.95376544118533,0 -87.65606302030132,41.95376391658746,0 -87.65623502146268,41.95377379126367,0 -87.65634748981634,41.95380103566435,0 -87.65646537904269,41.95387703994676,0 -87.65656532461145,41.95396622645799,0 -87.65664760856414,41.95404201996044,0 -87.65671750555913,41.95416647054043,0 -87.65673983607117,41.95429949810849,0 -87.65673866475777,41.95441024240925,0 -87.6567690255541,41.95490657227902,0 -87.65683672482363,41.95692259283837,0 -87.6568900886376,41.95861070983142,0 -87.65699865558875,41.96181418669004,0 -87.65756347177603,41.96397045777844,0 -87.65758750947528,41.96427269188822,0ah-87.65362593118043,41.94742799535678,0 -87.65363554415794,41.94819886386848,0 -87.6536456393239,41.95059994675451,0 -87.65365831235026,41.95108288489359,0 -87.6536604873874,41.9519954657554,0 -87.65362592053201,41.95245597302328,0 -87.65367158496069,41.95311153649393,0 -87.65368468595476,41.9533202828916,0 -87.65369271253692,41.95343095587119,0 -87.65373335834569,41.95351536301472,0 -87.65378605844126,41.95358212680591,0 -87.65385067928185,41.95364452823767,0 -87.6539390793817,41.95370263886964,0 -87.6540786298351,41.95373403675265,0 -87.65430648647626,41.9537535411832,0 -87.65492939166126,41.95377494531437,0a -87.65345391792157,41.94217681262115,0 -87.65342448305786,41.94237224420864,0 -87.65339745703922,41.94268217746244,0 -87.65337753982941,41.94288140770284,0 -87.65336256753105,41.94317369618263,0 -87.65338799707138,41.94357253961736,0 -87.65340240886648,41.94389158188269,0 -87.65341837392448,41.94406444407721,0 -87.65342275247338,41.94421065714904,0 -87.65347469646018,41.94434829382345,0 -87.65351486483024,41.94447699917548,0 -87.65353483605053,41.9453896864472,0 -87.65361975532807,41.94689193720703,0 -87.65362593118043,41.94742799535678,0��id�name�styleUrl�extrude�altitudeMode�coordinatesc��tjd�d}tjt|��5tt�ddd�y#1swYyxYw)N�lxml��Passing literal xml to 'read_xml' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.��match)�pytest�importorskip�tm�assert_produces_warning�
FutureWarningr�xml_default_nmsp��msgs �>C:\Python312\Lib\site-packages\pandas/tests/io/xml/test_xml.py�test_literal_xml_deprecationrA�sJ��
�����	:��
�	#�	#�M��	=�#��!�"�#�#�#�s�A�A�rb�r)�paramsc��|jS�N��param��requests r@�moderK����=�=��r4)�marks�etreec��|jSrFrGrIs r@�parserrQrLrMc���tj�5}t|dd��5}|j|�ddd�t	|fi|��cddd�S#1swY�xYw#1swYyxYw)N�w�utf-8��encoding)r:�ensure_clean�open�writer)�data�kwargs�path�fs    r@�read_xml_iterparser^sc��	���	�(�d�
�$��g�
.�	�!�
�G�G�D�M�	���'��'�(�(�	�	��(�(�s!�A�A�A�A	�A�A(c�b�t|d|��5}tj�5}t|dd��5}|j	|j
j
��ddd�t|fi|��cddd�cddd�S#1swY�'xYw#1swYnxYw	ddd�y#1swYyxYw)NrC)�compressionrSrTrU)rr:rWrXrY�handle�readr)�	comp_path�compression_onlyr[�handlesr\r]s      r@�read_xml_iterparse_comprfs���	�I�s�0@�	A�,�W�
�_�_�
�	,�$��d�C�'�2�
/�a�������+�+�-�.�
/��D�+�F�+�	,�	,�,�,�
/�
/��	,�	,��	,�,�,�,�s9�B%�B�*B�B�0	B%�B�B�B	�B%�%B.c�.�tjd�t|d��}t|d��}t|ddgd�i��}t|ddgd�i��}tj||�tj||�tj||�y)Nr4�rQrO�book��category�title�year�author�price�rQ�	iterparse�r8r9rr:�assert_frame_equal)�	xml_books�df_file_lxml�
df_file_etree�df_iter_lxml�
df_iter_etrees     r@�test_parser_consistency_filery#s���
������I�f�5�L��Y�w�7�M�����K�L��L�
����K�L��M����,�
�6����,��5����,�
�6rMc���|jt��ttt�|��}tt	tj��|dgd�i��}t
j||�y)N��contentrh�rowrrp)�
serve_contentr=rrr�encoder:rs)rQ�
httpserver�df_xpath�df_iters    r@�test_parser_consistency_urlr�8sb�����%5��6���!1�2�6�B�H��� �'�'�)�*���7�8��G����(�G�,rMc���t|||dk(rdnd��5}t||��}ddd�tgd�gd�gd�gd�gd	�d
��}tj|�y#1swY�;xYw�NrCrTrUrh��cooking�children�web�zEveryday ItalianzHarry PotterzLearning XML�zGiada De LaurentiiszJ K. RowlingzErik T. Ray���r�i��g>@g=
ףp�=@g������C@�rkrlrnrmro)rXrrr:rs)rtrQrKr]�df_file�df_expecteds      r@�test_file_liker�Gsk��	
�i��4�3�;��D�	I�-�Q��1�V�,��-��6�I�L�&�*�	
��K����'�;�/�-�-�s�A�A'c�<�t|||dk(rdnd��5}|j�}ddd�ttt�rt|�n
t
|�|��}tgd�gd�gd�gd�gd	�d
��}tj||�y#1swY�lxYwr�)
rXrbr�
isinstance�bytesrrrr:rs)rtrQrKr]�xml_obj�df_ior�s       r@�test_file_ior�Xs���	
�i��4�3�;��D�	I��Q��&�&�(���
�'���7���	�X�g�=N��
�E�
�6�I�L�&�*�	
��K����%��-�%��s�B�Bc�R�t|||dk(rdnd��5}|j�}ddd�|dk(rtj��}n|dk(rt�}t	|��}tgd�gd�gd�gd	�gd
�d��}t
j||�y#1swY�wxYw�NrCrTrUrBrhr�r�r�r�r�r�)rXrbr�decoderrr:rs�rtrQrKr]r��df_strr�s       r@� test_file_buffered_reader_stringr�ns���	
�i��4�3�;��D�	I��Q��&�&�(����t�|��7�>�>�+�,��	
����7�#��
�g�f�
-�F��6�I�L�&�*�	
��K����&�+�.�)��s�B�B&c�h�t|||dk(rdnd��5}t|�|j�}ddd�|dk(rtj	��}n|dk(rt�}t|��}t
gd�gd�gd�gd	�gd
�d��}tj||�y#1swY�wxYwr�)	rX�nextrbrr�rrr:rsr�s       r@�,test_file_buffered_reader_no_xml_declarationr��s���	
�i��4�3�;��D�	I��Q��Q���&�&�(����t�|��7�>�>�+�,��	
����7�#��
�g�f�
-�F��6�I�L�&�*�	
��K����&�+�.�+��s�B(�(B1c��d}tt|�|��}tddd�dg��}tj||�y)N�<<中文標籤><row><c1>1</c1><c2>2</c2></row></中文標籤>rhr)r*)�c1�c2r)�index�rrrr:rs)rQ�txtr�r�s    r@�test_string_charsetr��s:��
H�C�
�h�s�m�F�
3�F��1�A�.�q�c�:�K����&�+�.rMc��t||��}tgd�djddg�ddggd�d��}tj||�y)	Nrh)uP問  若箇是邪而言破邪 何者是正而道(Sorry, this is Big5 only)申正u;問 既破有得申無得 亦應但破性執申假名以不uO問 既破性申假 亦應但破有申無 若有無兩洗 亦應性假雙破耶�u<答  邪既無量 正亦多途  大略為言不出二種 謂u;有得與無得 有得是邪須破 無得是正須申
		故uL答  不例  有無皆是性 所以須雙破 既分性假異 故有破不破)NuV答 性執是有得 假名是無得  今破有得申無得 即是破性執申假名也N)u問u答�a)rr�joinr:rs)�xml_doc_ch_utfrQr�r�s    r@�test_file_charsetr��s_���~�f�5�G������V�X����^�	��!	
��K�2���'�;�/rMc��t|d�5}tt|j��|��|jrJ�	ddd�y#1swYyxYw)NrBrh)rXrrrb�closed)rtrQr]s   r@�test_file_handle_closer��sF��	
�i��	��!�������"�6�2��8�8��|�8����s�3A
�
A�valr�rMc�:�tjd�}djddg�}tj|j|��5t|t�rtt|�d��ntt|�d��ddd�y#1swYyxYw)N�
lxml.etree�|zDocument is emptyzNone \(line 0\)r6r4rh)
r8r9r��raises�XMLSyntaxErrorr��strrrr)r��
lxml_etreer?s   r@�test_empty_string_lxmlr��s|���$�$�\�2�J�

�(�(���	
��C�
���z�0�0��	<�2��c�3���X�c�]�6�2��W�S�\�&�1�	2�2�2�s�
>B�Bc���tjtd��5t|t�rtt
|�d��ntt|�d��ddd�y#1swYyxYw)Nzno element foundr6rOrh)r8r�r	r�r�rrr)r�s r@�test_empty_string_etreer��sL��	���z�);�	<�3��c�3���X�c�]�7�3��W�S�\�'�2�	3�3�3�s�>A#�#A,c���d}tjjddd�}tjt
|��5t
||��ddd�y#1swYyxYw)Nr5rZ�htmlz	books.xmlr6rh)�osr\r�r8r�r<r)rQr?�filenames   r@�test_wrong_file_pathr��sW��	:��
�w�w�|�|�F�F�K�8�H�	�����
�*�	��&�)�	*�*�*�s�A�Ac�B�tjd�t|d��5}|j|j	���t|jd��}ddd�tgd�gd�gd	�gd
�gd�d��}tj|�y#1swY�;xYw)
Nr4rTrUr{�.//book[count(*)=4]��xpathr�r�r�r�r�r�)
r8r9rXr~rbr�urlrr:rs)r��xml_filer]�df_urlr�s     r@�test_urlr��s��������	
�h��	)�G�Q�� � ����� �2��*�.�.�0E�F��G��6�I�L�&�*�	
��K����&�+�.�G�G�s�8B�Bc��|jdd��tjtd��5t	|j
d|��ddd�y#1swYyxYw)Nz	NOT FOUNDi�)�codezHTTP Error 404: NOT FOUNDr6r��r�rQ)r~r8r�rrr�)rQr�s  r@�test_wrong_urlr�sP�����[�s��3�	���y�)D�	F�M�����'<�V�L�M�M�M�s�A�Ac���d}tt|�|d��}t||dgd�id��}tgd�gd�gd	�d�d�
�}t	j
||�t	j
||�y)Na�
      <data>
        <row sides=" 4 ">
          <shape>
              square
          </shape>
          <degrees>&#009;360&#009;</degrees>
        </row>
        <row sides=" 0 ">
          <shape>
              circle
          </shape>
          <degrees>&#009;360&#009;</degrees>
        </row>
        <row sides=" 3 ">
          <shape>
              triangle
          </shape>
          <degrees>&#009;180&#009;</degrees>
        </row>
      </data>�string)rQ�dtyper})r"r r!)rQrqr�)z 4 z 0 z 3 )z 
              square
          z 
              circle
          z"
              triangle
          )�	360	r�z	180	�r��rrr^rr:rs�rQ�xmlr�r�r�s     r@�test_whitespacer�s~���C�,���
�f�H�E�H� ����7�8��	�G��*��
9�	
���K����(�K�0����'�;�/rMc��tjd�tjtd��5t	|dd��ddd�y#1swYyxYw)Nr4�xpath does not return any nodesr6z	.//pythonr��r8r9r��
ValueErrorr�rts r@�test_empty_xpath_lxmlr�Ms@��
�����	���z�*K�	M�>���+�f�=�>�>�>���A	�	Ac��tjtd��5t|dd��ddd�y#1swYyxYw)Nz/You have used an incorrect or unsupported XPathr6�	.//[book]rOr��r8r��SyntaxErrorrr�s r@�test_bad_xpath_etreer�Ss7��	����M�
�?�	��+�g�>�?�?�?���4�=c��tjd�}tj|jd��5t	|dd��ddd�y#1swYyxYw)Nr�zInvalid expressionr6r�r4r��r8r9r��XPathEvalErrorr)rtr�s  r@�test_bad_xpath_lxmlr�ZsH���$�$�\�2�J�	���z�0�0�9M�	O�>���+�f�=�>�>�>���A�Ac��ttt�dddi|��}tt|dgd�i��}t	gd�gd	�d
td�dgd��}t
j||�t
j||�y)
N�	.//ns:row�ns�http://example.com�r��
namespacesrQr}rrprr�@�nan�@)rrr=r^r�floatr:rs�rQ�df_nmspr�r�s    r@�test_default_namespacer�ds�����!�"���.�/��	�G�!����7�8��G��5�&��5��<��-�	
��K����'�;�/����'�;�/rMc��ttt�dddi|��}tt|dgd�i��}t	gd�gd	�d
td�dgd��}t
j||�t
j||�y)
N�
.//doc:row�docr�r�r}rrprrr�r�r�)rr�xml_prefix_nmspr^rr�r:rsr�s    r@�test_prefix_namespacer�~s������!���/�0��	�G�!���5�:W�2X��G��5�&��5��<��-�	
��K����'�;�/����'�;�/rMc���tjd�ttt�dddid��}ttt�dddid��}tj||�y)	Nr4r�r�r�r�r�r�rO)r8r9rrr=r:rs��df_lxml�df_etrees  r@�"test_consistency_default_namespacer�sh��
�������!�"���.�/��	�G���!�"���/�0��	�H����'�8�,rMc���tjd�ttt�dddid��}ttt�dddid��}tj||�y)Nr4r�r�r�r�rO)r8r9rrr�r:rsr�s  r@�!test_consistency_prefix_namespacer�sf��
��������!���/�0��	�G����!���/�0��	�H����'�8�,rMc��tjtd��5t|d|��ddd�y#1swYyxYw)Nr�r6z.//Placemarkr��r8r�r�r�rtrQs  r@�*test_missing_prefix_with_default_namespacer�s6��	���z�*K�	M�A���.��@�A�A�A�r�c��tjtd��5t|dd��ddd�y#1swYyxYw)Nz'you used an undeclared namespace prefixr6�.//kml:PlacemarkrOr�r�)�kml_cta_rail_liness r@�$test_missing_prefix_definition_etreer
�s8��	���{�+T�	V�O��#�+=�g�N�O�O�O�r�c��tjd�}tj|jd��5t	|dd��ddd�y#1swYyxYw)Nr�zUndefined namespace prefixr6rr4r�r�)r	r�s  r@�#test_missing_prefix_definition_lxmlr�sN���$�$�\�2�J�	���z�0�0�9U�	W�N��#�+=�f�M�N�N�N�r��keyc���tjd�tjtd��5t	tt�d|did��ddd�y#1swYyxYw)Nr4z0empty namespace prefix is not supported in XPathr6r�http://www.opengis.net/kml/2.2r�)r8r9r��	TypeErrorrrr=)r
s r@�test_none_namespace_prefixr�sY��
�����	����L�
�
�	��%�&�$��=�>��		
�
�
�
�s�A�A"c���t||��}t||dgd�i��}tgd�gd�gd�gd�gd	�d��}tj||�tj||�y)
Nrhrir�rpr�r�r�r�r��rrr:rs�rtrQr�r�r�s     r@�test_file_elems_and_attrsr�si���y��0�G�����K�L��G�
�6�I�L�&�*�	
��K����'�;�/����'�;�/rMc��t|d|��}t||ddgi��}tdgd�i�}tj||�tj||�y)NT)�
attrs_onlyrQrirkrpr�rrs     r@�test_file_only_attrsr�sU���y�T�&�A�G��y��F�Z�L�;Q�R�G��Z�)G�H�I�K����'�;�/����'�;�/rMc���t|d|��}t||dgd�i��}tgd�gd�gd�gd	�d��}tj||�tj||�y)
NT)�
elems_onlyrQri)rlrnrmrorpr�r�r�r�rrs     r@�test_file_only_elemsr�sh���y�T�&�A�G�����?�@��G�
�I�L�&�*�		
��K����'�;�/����'�;�/rMc��tjtd��5t|dd|��ddd�y#1swYyxYw)Nz3Either element or attributes can be parsed not bothr6T)rrrQr)r	rQs  r@�test_elem_and_attrs_onlyrs>��	����D�
�V�	�#���f�U�	V�V�V�s�5�>c��d}tjtd��5tt	|�dd|��ddd�y#1swYyxYw)NaU
      <data>
        <row>
          <shape sides="4">square</shape>
          <degrees>360</degrees>
        </row>
        <row>
          <shape sides="0">circle</shape>
          <degrees>360</degrees>
        </row>
        <row>
          <shape sides="3">triangle</shape>
          <degrees>180</degrees>
        </row>
      </data>�-xpath does not return any nodes or attributesr6�./rowT)r�rrQ�r8r�r�rr�rQr�s  r@�test_empty_attrs_onlyr#sJ���C� 
����>�
�O�	��#��g�$�v�N�	O�O�O���A�A	c��d}tjtd��5tt	|�dd|��ddd�y#1swYyxYw)Nz�
      <data>
        <row sides="4" shape="square" degrees="360"/>
        <row sides="0" shape="circle" degrees="360"/>
        <row sides="3" shape="triangle" degrees="180"/>
      </data>rr6r T)r�rrQr!r"s  r@�test_empty_elems_onlyr&2sJ���C�
����>�
�O�	��#��g�$�v�N�	O�O�O�r$c�*�tjd�d}tt|�d��}tt|�dd��}t	|ddd	gi�
�}t	|dddd	gi��}tj||�tj||�y)Nr4a�<?xml version="1.0" encoding="UTF-8"?>
<TrainSchedule>
      <Stations>
         <station Name="Manhattan" coords="31,460,195,498"/>
         <station Name="Laraway Road" coords="63,409,194,455"/>
         <station Name="179th St (Orland Park)" coords="0,364,110,395"/>
         <station Name="153rd St (Orland Park)" coords="7,333,113,362"/>
         <station Name="143rd St (Orland Park)" coords="17,297,115,330"/>
         <station Name="Palos Park" coords="128,281,239,303"/>
         <station Name="Palos Heights" coords="148,257,283,279"/>
         <station Name="Worth" coords="170,230,248,255"/>
         <station Name="Chicago Ridge" coords="70,187,208,214"/>
         <station Name="Oak Lawn" coords="166,159,266,185"/>
         <station Name="Ashburn" coords="197,133,336,157"/>
         <station Name="Wrightwood" coords="219,106,340,133"/>
         <station Name="Chicago Union Sta" coords="220,0,360,43"/>
      </Stations>
</TrainSchedule>z
.//stationr�rOr��station�Name�coords�rqrp)r8r9rrr^r:rs)r�r�r��
df_iter_lx�
df_iter_ets     r@�test_attribute_centric_xmlr.As���
������C�(�x��}�L�9�G����
�\�'�J�H�#�C�I���?Q�3R�S�J�#��G�	�F�H�3E�'F��J����'�8�,����*�j�1rMc���t|gd�|��}t||gd�dgd�i��}tgd�gd�gd�gd	�gd
�d��}tj||�tj||�y)N)�Col1�Col2�Col3�Col4�Col5��namesrQrir�)rQr6rqr�r�r�r�r�rrs     r@�test_names_option_outputr7fst����A�&��G����6��K�L�	�G��2�H�J�&�)�	
��K����'�;�/����'�;�/rMc���d}tt|�d|gd���}t||dgd�igd���}tdd	gd
dgddgd��}t	j
||�t	j
||�y)
Nz�<shapes>
  <shape type="2D">
    <name>circle</name>
    <type>curved</type>
  </shape>
  <shape type="3D">
    <name>sphere</name>
    <type>curved</type>
  </shape>
</shapes>�.//shape)�type_dimr �	type_edge�r�rQr6r )�typer.r=�rQrqr6�2D�3Dr�sphere�curvedr�r�s     r@�test_repeat_namesrCs���

�C����
���0�	�H�!����4�5�0�	�G���t����)�"�H�-�	
��K����(�K�0����'�;�/rMc���d}tt|�d|ddg��}t||dddgiddg��}tgd	�gd
�d��}t	j
||�t	j
||�y)NaB<shapes>
  <shape>
    <name>rectangle</name>
    <family>rectangle</family>
  </shape>
  <shape>
    <name>square</name>
    <family>rectangle</family>
  </shape>
  <shape>
    <name>ellipse</name>
    <family>ellipse</family>
  </shape>
  <shape>
    <name>circle</name>
    <family>ellipse</family>
  </shape>
</shapes>r9r.�groupr<r �familyr>)�	rectangler�ellipser)rGrGrHrH)r.rEr�r�s     r@�test_repeat_values_new_namesrI�s���
�C�&���
�Z��v�w�>O��H�!����V�X�.�/��w��	�G��@�E�	
��K����(�K�0����'�;�/rMc���d}tt|�d|gd���}t||dgd�igd���}tgd�gd	�gd
�gd�d��}t	j
||�t	j
||�y)Na<shapes>
  <shape>
    <value item="name">circle</value>
    <value item="family">ellipse</value>
    <value item="degrees">360</value>
    <value item="sides">0</value>
  </shape>
  <shape>
    <value item="name">triangle</value>
    <value item="family">polygon</value>
    <value item="degrees">180</value>
    <value item="sides">3</value>
  </shape>
  <shape>
    <value item="name">square</value>
    <value item="family">polygon</value>
    <value item="degrees">360</value>
    <value item="sides">4</value>
  </shape>
</shapes>r9)r.rFr!r"r<r )�valuerKrKrKr>)rrr)rH�polygonrL)rrr)rrrr�r�s     r@�test_repeat_elementsrM�s���
�C�*���
���4�	�H�!����@�A�4�	�G��4�7�&��		
��K����(�K�0����'�;�/rMc��tjtd��5t|gd�|��ddd�y#1swYyxYw)Nznames does not match lengthr6)r0r1r2r5rrs  r@�test_names_option_wrong_lengthrOs7��	���z�*G�	I�K���":�6�J�K�K�K���6�?c��tjtd��5t|d|��ddd�y#1swYyxYw)Nzis not a valid type for namesr6zCol1, Col2, Col3r5�r8r�rrrs  r@�test_names_option_wrong_typerSs7��	���y�)H�	J�E���"4�V�D�E�E�E�r�c�~�tjtd��5t||��ddd�y#1swYyxYw)Nz'utf-8' codec can't decoder6rh�r8r��UnicodeDecodeErrorr��xml_baby_namesrQs  r@�test_wrong_encodingrY
s1��	���)�2N�	P�0����/�0�0�0���3�<c��tjtd��5t|d|��ddd�y#1swYyxYw)NzLUTF-16 stream does not start with BOM|'utf-16(-le)?' codec can't decode byter6zUTF-16�rVrQ)r8r��UnicodeErrorrrWs  r@�test_utf16_encodingr^s=��	����
5�
�C�	��(�6�B�C�C�C�r�c��tjtd��5t|d|��ddd�y#1swYyxYw)Nzunknown encoding: UFT-8r6zUFT-8r\)r8r��LookupErrorrrWs  r@�test_unknown_encodingras6��	���{�+D�	F�B���'�&�A�B�B�B�r�c��tjtd��5t|d|��ddd�y#1swYyxYw)Nz'ascii' codec can't decode byter6�asciir\rUrWs  r@�test_ascii_encodingrd"s7��	���)�2S�	U�B���'�&�A�B�B�B�r�c�6�tjd�t|dd��}t|dd��}t|dddgd�i��}t|dddgd�i��}tj||�tj||�tj||�y)	Nr4z
ISO-8859-1�rQrVrOz
iso-8859-1r})�rank�malename�
femalename)rQrVrqrr)rX�
df_xpath_lxml�df_xpath_etreerwrxs     r@�%test_parser_consistency_with_encodingrl's���
������^�F�\�R�M��n�W�|�T�N������<�=�	�L������<�=�	�M����-��8����.�-�8����,�
�6rMc��tjd�d}tjtd��5t	t|�dd��ddd�y#1swYyxYw)Nr4�-<data>
  <row>
    <a>c</a>
  </row>
</data>
z
encoding Noner6rf)r8r9r�rrr)rZs r@�test_wrong_encoding_for_lxmlro>sL��
������D�
���y��	8�?���$����>�?�?�?�s�A�Ac�~�d}tt|�dd��}tddgi�}tj||�y)NrnrOrfr��cr�)rZ�result�expecteds   r@�test_none_encoding_etreertKs=���D��h�t�n�W�t�
D�F��#��u��&�H����&�(�+rMc�z�tjtd��5t|�ddd�y#1swYyxYw)Nz7lxml not found, please install or use the etree parser.r6)r8r��ImportErrorrr�s r@�test_default_parser_no_lxmlrw[s3��	����U�
��	������s�1�:c�~�tjtd��5t|d��ddd�y#1swYyxYw)Nz,Values for parser can only be lxml or etree.r6�bs4rhrr�s r@�test_wrong_parserrzcs5��	����I�
�*�	��5�)�*�*�*�rZc���tjd�t|dddi|��}t|dgd�i��}tjt
|�tjt
|�y)	Nr4�.//k:Placemark�kr�r�r��
stylesheet�	Placemarkr,r+)r8r9rr:rs�df_kml)r	�xsl_flatten_doc�df_styler�s    r@�test_stylesheet_filer�msj��
���������9�:�"�	�H�����	
��G����&�(�+����&�'�*rMc���tjd�t|||dk(rdnd��5}t|dddi|��}ddd�t	j
t�y#1swY�$xYw�	Nr4rCrTrUr|r}rr~)r8r9rXrr:rsr�)r	r�rKr]r�s     r@�test_stylesheet_file_liker��sj��
�����	
�o�t����g�$�	O�
�ST���"��=�>��	
��
����&�(�+�
�
�s�A � A)c�H�tjd�t|||dk(rdnd��5}|dk(rt|j	��}nt|j	��}ddd�t
|dddi�	�}tjt|�y#1swY�5xYw)
Nr4rCrTrUrBr|r}rr~)
r8r9rXrrbrrr:rsr��r	r�rKr]�xsl_objr�s      r@�test_stylesheet_ior��s��������
�o�t����g�$�	O�)�ST��4�<��a�f�f�h�'�G��q�v�v�x�(�G�	)�����9�:��	�H����&�(�+�)�)�s�9B�B!c��tjd�t|||dk(rdnd��5}|j�}ddd�t	|dddi��}tjt|�y#1swY�5xYwr�)r8r9rXrbrr:rsr�r�s      r@�test_stylesheet_buffered_readerr��sw��
�����	
�o�t����g�$�	O��ST��&�&�(�������9�:��	�H����&�(�+���s�A0�0A9c��tjd�d}d}tt|��}tt|�|��}t	j
||�y)Nr4r�u�<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes" indent="yes"/>
 <xsl:strip-space elements="*"/>

 <xsl:template match="node()|@*">
     <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
     </xsl:copy>
 </xsl:template>

 <xsl:template match="中文標籤">
     <根>
       <xsl:apply-templates />
     </根>
 </xsl:template>

</xsl:stylesheet>�r)r8r9rrr:rs)r��xsl�df_origr�s    r@�test_style_charsetr��sL��
�����
H�C��C�&�x��}�%�G����
�#�6�H����'�8�,rMc��tjd�}tj|jd��5t	||��ddd�y#1swYyxYw)Nr�zdocument is not a stylesheetr6r��r8r9r��XSLTParseErrorr)r	rtr�s   r@�test_not_stylesheetr��sL���$�$�\�2�J�	����!�!�*H�
�;�	�#�	�:�;�;�;�s�A�Ac��tjd�}d}tj|jd��5t	||��ddd�y#1swYyxYw)Nr�a�<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              xmlns:k="http://www.opengis.net/kml/2.2"/>
    <xsl:output method="xml" omit-xml-declaration="yes"
                cdata-section-elements="k:description" indent="yes"/>
    <xsl:strip-space elements="*"/>

    <xsl:template match="node()|@*">
     <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
     </xsl:copy>
    </xsl:template>

    <xsl:template match="k:MultiGeometry|k:LineString">
        <xsl:apply-templates select='*'/>
    </xsl:template>

    <xsl:template match="k:description|k:Snippet|k:Style"/>
</xsl:stylesheet>z(Extra content at the end of the documentr6r��r8r9r�r�r�r	r�r�s   r@�test_incorrect_xsl_syntaxr��sU���$�$�\�2�J��C�(
����!�!�*T�
�5�	�#��4�5�5�5���A�Ac��tjd�}d}tj|jd��5t	||��ddd�y#1swYyxYw)Nr�a�<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              xmlns:k="http://www.opengis.net/kml/2.2">
    <xsl:output method="xml" omit-xml-declaration="yes"
                cdata-section-elements="k:description" indent="yes"/>
    <xsl:strip-space elements="*"/>

    <xsl:template match="node(*)|@*">
     <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
     </xsl:copy>
    </xsl:template>

    <xsl:template match="k:MultiGeometry|k:LineString">
        <xsl:apply-templates select='*'/>
    </xsl:template>

    <xsl:template match="k:description|k:Snippet|k:Style"/>
</xsl:stylesheet>zfailed to compiler6r�r�r�s   r@�test_incorrect_xsl_evalr��sP���$�$�\�2�J��C�(
���z�0�0�9L�	N�5��#��4�5�5�5�r�c��tjd�}d}tj|jd��5t	||��ddd�y#1swYyxYw)Nr�ag<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" encoding="utf-8" indent="yes" />
    <xsl:strip-space elements="*"/>

    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:copy-of select="document('non_existent.xml')/*"/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>zCannot resolve URIr6r�)r8r9r��XSLTApplyErrorrr�s   r@�test_incorrect_xsl_applyr�sP���$�$�\�2�J�
�C�
���z�0�0�9M�	O�5��#��4�5�5�5�r�c��tjd�}|dz}tj|jd��5t	||��ddd�y#1swYyxYw)Nr�zflatten.xslz!Start tag expected, '<' not foundr6r�r�)r	�
xml_data_path�	xml_etreer�s    r@�test_wrong_stylesheetr�+sV���#�#�L�1�I�
�-�
'�C�	���� � �2�
�5�	�#��4�	5�5�5�s�A�Ac�*�tjd�t|||dk(rdnd��5}|dk(rt|j	��}nt|j	��}t
||��|jrJ�	ddd�y#1swYyxYw)Nr4rCrTrUrBr�)r8r9rXrrbrrr�)r	r�rKr]r�s     r@�test_stylesheet_file_closer�7s��������
�o�t����g�$�	O��ST��4�<��a�f�f�h�'�G��q�v�v�x�(�G��#��8��8�8��|�8����s�AB	�	Bc��tjd�tjtd��5t	|d|��ddd�y#1swYyxYw)Nr4z*To use stylesheet, you need lxml installedr6rO)rQrr�)r	r�s  r@�test_stylesheet_with_etreer�HsJ��
�����	����G�
�Q�	�#�G��P�Q�Q�Q�r�c���tjd�d}tjj	ddd�}tj
t|��5t||��ddd�y#1swYyxYw)Nr4r5rZr�zcta_rail_lines.kmlr6r�)r8r9r�r\r�r�r<r)r�r?�kmls   r@�test_empty_stylesheetr�Ps`��
�����	:��

�'�'�,�,�v�u�&:�
;�C�	���}�C�	0�&����%�&�&�&�s�A+�+A4c	��t|||dk(rdnd��5}|dk(rE|dk(r@tjtd��5t	||dgd�i�	�ddd�	ddd�yt	||dgd�i�	�}	ddd�tgd
�gd�gd�gd
�gd�d��}t
j|�y#1swY�`xYw#1swY�GxYw�NrCrTrUr4z.reading file objects must return bytes objectsr6rirjrpr�r�r�r�r�r�)rXr8r�rrrr:rs)rtrQrKr]�df_fileliker�s      r@�test_file_like_iterparser�_s���	
�i��4�3�;��D�	I��Q��3�;�6�V�+�����"R��	
���!�� P���	
����#���!�#S�T��K��(�6�I�L�&�*�	
��K����+�{�3�9	
�	
����s(�&B:�B.�	B:�!B:�.B7	�3B:�:Cc
��|dk(rtnt}t|||dk(rdnd��5}||j��5}|dk(rM|dk(rHt	j
td��5t||dgd�i�	�ddd�	ddd�ddd�yt||dgd�i�	�}	ddd�ddd�tgd
�gd�gd�gd
�gd�d��}tj|�y#1swY�pxYw#1swY�OxYw#1swY�SxYwr�)rrrXrbr8r�rrrr:rs)rtrQrK�funcIOr]�b�	df_fileior�s        r@�test_file_io_iterparser��s�����X�'�F�	
��� �C�K��T�
��
�
�A�F�F�H�
�	���s�{�v��/��]�]��&V��	���%�"�$T�#��	��	���&%��!�� P���	�	��6�6�I�L�&�*�	
��K����)�[�1�=	�	��	�	����sF�C>�&C2�$C&�7	C2�C>�C2�$C>�&C/�+C2�2C;	�7C>�>Dc	� �t|d��5}|j|j���tjt
d��5t
|j|dgd�i��ddd�ddd�y#1swY�xYw#1swYyxYw)	NrTrUr{�)iterparse is designed for large XML filesr6r}�r r!r"�daterp)rXr~rbr8r�r
rr�)rQr�r�r]s    r@�test_url_path_errorr��s���
�h��	)�	�Q�� � ����� �2�
�]�]�� K�
�	�
����� �"G�H�
�	�	�	�	�	��	�	�s#�<B�
A8�'B�8B	�=B�B
c	��tjd��5}tj|||��t	j
td��5t||dgd�i|��ddd�ddd�y#1swY�xYw#1swYyxYw)	Nzgeom_xml.zip�r��rQr`r�r6r}r��rQrqr`)r:rW�geom_df�to_xmlr8r�r
r)rQrdr\s   r@�test_compression_errorr��s���	���.�	1��T����t�F�8H��I�
�]�]�� K�
�	�
��� �"G�H�,�	
�	���	�	����s#�4A<�A0�A<�0A9	�5A<�<Bc��tjtd��5t||gd���ddd�y#1swYyxYw)Nz&list is not a valid type for iterparser6rjrprRrs  r@�test_wrong_dict_typer��s7��	���y�(P�	Q�
����F�	
�
�
�
�rPc��tjtd��5t||ddi��ddd�y#1swYyxYw)Nz8<class 'str'> is not a valid type for value in iterparser6rirkrprRrs  r@�test_wrong_dict_valuer��s@��	����S�
�K�	��6�f�j�5I�J�K�K�K�rPc
�N�d}tjd��5}t|dd��5}|j|�ddd�t	j
td��5t||d	gd
gd�i��ddd�ddd�y#1swY�JxYw#1swY�xYw#1swYyxYw)
Na�<?xml version='1.0' encoding='utf-8'?>
  <row>
    <shape>square</shape>
    <degrees>00360</degrees>
    <sides>4.0</sides>
    <date>2020-01-01</date>
   </row>
  <row>
    <shape>circle</shape>
    <degrees>00360</degrees>
    <sides/>
    <date>2021-01-01</date>
  </row>
  <row>
    <shape>triangle</shape>
    <degrees>00180</degrees>
    <sides>3.0</sides>
    <date>2022-01-01</date>
  </row>
zbad.xmlr�rSrTrUzDExtra content at the end of the document|junk after document elementr6r�r}r�)rQ�parse_datesrq)r:rWrXrYr8r�r�r)rQ�bad_xmlr\r]s    r@�test_bad_xmlr��s����G�*
���)�	,���
�$��g�
.�	�!�
�G�G�G��	��]�]��.�
�	�
���#�H� �"G�H�	
�	�	��	�	��	�	��	��s9�B�B�#B�B�2B�B	�B�B	�B�B$c���d}tt|�d|��}t||dddgi��}tdd	gd
dgd��}t	j
||�t	j
||�y)
Na-<!-- comment before root -->
<shapes>
  <!-- comment within root -->
  <shape>
    <name>circle</name>
    <type>2D</type>
  </shape>
  <shape>
    <name>sphere</name>
    <type>3D</type>
    <!-- comment within child -->
  </shape>
  <!-- comment within root -->
</shapes>
<!-- comment after root -->r9r�r r.r=rprrAr?r@�r.r=r�r�s     r@�test_commentr�sz���C�"���
�Z��G�H� ��F�w���0@�&A��G���x�(��4�L�	
��K����(�K�0����'�;�/rMc���d}tt|�d|��}t||dddgi��}tdd	gd
dgd��}t	j
||�t	j
||�y)
Na8<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE non-profits [
    <!ELEMENT shapes (shape*) >
    <!ELEMENT shape ( name, type )>
    <!ELEMENT name (#PCDATA)>
]>
<shapes>
  <shape>
    <name>circle</name>
    <type>2D</type>
  </shape>
  <shape>
    <name>sphere</name>
    <type>3D</type>
  </shape>
</shapes>r9r�r r.r=rprrAr?r@r�r�r�s     r@�test_dtdr�%�z��
�C�$���
�Z��G�H� ��F�w���0@�&A��G���x�(��4�L�	
��K����(�K�0����'�;�/rMc���d}tt|�d|��}t||dddgi��}tdd	gd
dgd��}t	j
||�t	j
||�y)
Nam<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>
<?display table-view?>
<?sort alpha-ascending?>
<?textinfo whitespace is allowed ?>
<?elementnames <shape>, <name>, <type> ?>
<shapes>
  <shape>
    <name>circle</name>
    <type>2D</type>
  </shape>
  <shape>
    <name>sphere</name>
    <type>3D</type>
  </shape>
</shapes>r9r�r r.r=rprrAr?r@r�r�r�s     r@�test_processing_instructionr�Ir�rMc��tjtd��5t||dgd�i��ddd�y#1swYyxYw)Nz+No result from selected items in iterparse.r6�node��attr1�elem1�elem2�elem3rp)r8r�r
rrs  r@�test_no_resultr�msB��	����H�
�
�	����C�D�	
�
�
�
��	�8�Ac��tjtd��5t||dgd�i��ddd�y#1swYyxYw)NzNo columns to parse from filer6rir�rp)r8r�rrrs  r@�test_empty_datar�xs=��	���~�-L�	M�
�����C�D�	
�
�
�
�r�c	���tjd�d}d}tt|�dddg|��}t	dd	d
ddd
�dddddd
�d��}tj||�y)Nr4a<?xml version="1.0" encoding="UTF-8"?>
<catalog>
  <cd>
    <title>Empire Burlesque</title>
    <artist>Bob Dylan</artist>
    <country>USA</country>
    <company>Columbia</company>
    <price>10.90</price>
    <year>1985</year>
  </cd>
  <cd>
    <title>Hide your heart</title>
    <artist>Bonnie Tyler</artist>
    <country>UK</country>
    <company>CBS Records</company>
    <price>9.90</price>
    <year>1988</year>
  </cd>
  <cd>
    <title>Greatest Hits</title>
    <artist>Dolly Parton</artist>
    <country>USA</country>
    <company>RCA</company>
    <price>9.90</price>
    <year>1982</year>
  </cd>
  <cd>
    <title>Still got the blues</title>
    <artist>Gary Moore</artist>
    <country>UK</country>
    <company>Virgin records</company>
    <price>10.20</price>
    <year>1990</year>
  </cd>
  <cd>
    <title>Eros</title>
    <artist>Eros Ramazzotti</artist>
    <country>EU</country>
    <company>BMG</company>
    <price>9.90</price>
    <year>1997</year>
  </cd>
  <cd>
    <title>One night only</title>
    <artist>Bee Gees</artist>
    <country>UK</country>
    <company>Polydor</company>
    <price>10.90</price>
    <year>1998</year>
  </cd>
  <cd>
    <title>Sylvias Mother</title>
    <artist>Dr.Hook</artist>
    <country>UK</country>
    <company>CBS</company>
    <price>8.10</price>
    <year>1973</year>
  </cd>
  <cd>
    <title>Maggie May</title>
    <artist>Rod Stewart</artist>
    <country>UK</country>
    <company>Pickwick</company>
    <price>8.50</price>
    <year>1990</year>
  </cd>
  <cd>
    <title>Romanza</title>
    <artist>Andrea Bocelli</artist>
    <country>EU</country>
    <company>Polydor</company>
    <price>10.80</price>
    <year>1996</year>
  </cd>
  <cd>
    <title>When a man loves a woman</title>
    <artist>Percy Sledge</artist>
    <country>USA</country>
    <company>Atlantic</company>
    <price>8.70</price>
    <year>1987</year>
  </cd>
  <cd>
    <title>Black angel</title>
    <artist>Savage Rose</artist>
    <country>EU</country>
    <company>Mega</company>
    <price>10.90</price>
    <year>1995</year>
  </cd>
  <cd>
    <title>1999 Grammy Nominees</title>
    <artist>Many</artist>
    <country>USA</country>
    <company>Grammy</company>
    <price>10.20</price>
    <year>1999</year>
  </cd>
  <cd>
    <title>For the good times</title>
    <artist>Kenny Rogers</artist>
    <country>UK</country>
    <company>Mucik Master</company>
    <price>8.70</price>
    <year>1995</year>
  </cd>
  <cd>
    <title>Big Willie style</title>
    <artist>Will Smith</artist>
    <country>USA</country>
    <company>Columbia</company>
    <price>9.90</price>
    <year>1997</year>
  </cd>
  <cd>
    <title>Tupelo Honey</title>
    <artist>Van Morrison</artist>
    <country>UK</country>
    <company>Polydor</company>
    <price>8.20</price>
    <year>1971</year>
  </cd>
  <cd>
    <title>Soulsville</title>
    <artist>Jorn Hoel</artist>
    <country>Norway</country>
    <company>WEA</company>
    <price>7.90</price>
    <year>1996</year>
  </cd>
  <cd>
    <title>The very best of</title>
    <artist>Cat Stevens</artist>
    <country>UK</country>
    <company>Island</company>
    <price>8.90</price>
    <year>1990</year>
  </cd>
  <cd>
    <title>Stop</title>
    <artist>Sam Brown</artist>
    <country>UK</country>
    <company>A and M</company>
    <price>8.90</price>
    <year>1988</year>
  </cd>
  <cd>
    <title>Bridge of Spies</title>
    <artist>T`Pau</artist>
    <country>UK</country>
    <company>Siren</company>
    <price>7.90</price>
    <year>1987</year>
  </cd>
  <cd>
    <title>Private Dancer</title>
    <artist>Tina Turner</artist>
    <country>UK</country>
    <company>Capitol</company>
    <price>8.90</price>
    <year>1983</year>
  </cd>
  <cd>
    <title>Midt om natten</title>
    <artist>Kim Larsen</artist>
    <country>EU</country>
    <company>Medley</company>
    <price>7.80</price>
    <year>1983</year>
  </cd>
  <cd>
    <title>Pavarotti Gala Concert</title>
    <artist>Luciano Pavarotti</artist>
    <country>UK</country>
    <company>DECCA</company>
    <price>9.90</price>
    <year>1991</year>
  </cd>
  <cd>
    <title>The dock of the bay</title>
    <artist>Otis Redding</artist>
    <country>USA</country>
    <COMPANY>Stax Records</COMPANY>
    <PRICE>7.90</PRICE>
    <YEAR>1968</YEAR>
  </cd>
  <cd>
    <title>Picture book</title>
    <artist>Simply Red</artist>
    <country>EU</country>
    <company>Elektra</company>
    <price>7.20</price>
    <year>1985</year>
  </cd>
  <cd>
    <title>Red</title>
    <artist>The Communards</artist>
    <country>UK</country>
    <company>London</company>
    <price>7.80</price>
    <year>1987</year>
  </cd>
  <cd>
    <title>Unchain my heart</title>
    <artist>Joe Cocker</artist>
    <country>USA</country>
    <company>EMI</company>
    <price>8.20</price>
    <year>1987</year>
  </cd>
</catalog>
a7<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
  <h2>My CD Collection</h2>
  <table border="1">
    <tr bgcolor="#9acd32">
      <th style="text-align:left">Title</th>
      <th style="text-align:left">Artist</th>
    </tr>
    <xsl:for-each select="catalog/cd">
    <tr>
      <td><xsl:value-of select="title"/></td>
      <td><xsl:value-of select="artist"/></td>
    </tr>
    </xsl:for-each>
  </table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
z.//tr[td and position() <= 6]rl�artist)r�r6rzEmpire BurlesquezHide your heartz
Greatest HitszStill got the blues�Erosr(z	Bob DylanzBonnie TylerzDolly Partonz
Gary MoorezEros Ramazzotti)rlr�)r8r9rrrr:rs)r�r��df_xslr�s    r@�test_online_stylesheetr��s���
�����T�C�j�C�2���
�-���!��	�F��&�$�"�(����!�!��$��	
��K�&���+�v�.rMc	�4�tj�5}tj|d||��t	|||��}t|||dgd�i|��}ddd�tjt�tjt�y#1swY�>xYw)NF)r�rQr`r�r}rr�)r:rWr�r�rrfrs)rQrdrcr�r�s     r@�test_compression_readr��s���	���	�

�i�����U�6�?O�	�	
��I�f�BR�S��)�����;�<�(�
��

����(�G�,����'�7�+�!

�

�s�<B�Bc��|}|}||k(rtj|�d|���tdftdftdftdfd�}tdd�	�}|�|jd
f|d<tdd�	�}|�td
f|d<||\}}	tj�5}
tj|
||��tj||	��5t|
||��ddd�ddd�y#1swY�xYw#1swYyxYw)Nz == zInvalid data streamzNot a gzipped filezFile is not a zip filez%file could not be opened successfully)�bz2�gzip�zip�tar�	zstandard�ignore)�errorszUnknown frame descriptor�zstd�lzmaz%Input format not supported by decoder�xzr�r6)r8�skip�OSErrorr
rr�	ZstdErrorrr:rWr�r�r�r)rQr`rd�actual_compression�attempted_compressionr�r�r��	error_cls�	error_strr\s           r@�test_wrong_compressionr��s)��$��,���2�2����)�*�$�/D�.E�F�G��.�/��.�/��4�5��B�C�	�F�&�k�(�C�D����.�.�*D�E��v��%�f�X�>�D���!�#J�K��t��!�"7�8��I�y�	���	�M�d����t�F�8J��K�
�]�]�9�I�
6�	M��T�&�6K�L�	M�M�M�	M�	M��M�M�s$�0C5�	C)�C5�)C2	�.C5�5C>c���tjtd��5tj�5}t||d��ddd�ddd�y#1swY�xYw#1swYyxYw)NzUnrecognized compression typer6�7zr�)r8r�r�r:rWr)rQr\s  r@�test_unsuported_compressionr��sX��	���z�)H�	I�<�
�_�_�
�	<�$��T�&�d�;�	<�<�<�	<�	<��<�<�s"�A�A�A�A	�A�A&c���tjd�tjd�d|j�d�}t|d|��}t|d|��}t	j
||�y)N�s3fsr4zs3://z
/books.xml)rQ�storage_optionsrO)r8r9r.rr:rs)�s3_public_bucket_with_data�s3so�s3r�r�s     r@�test_s3_parser_consistencyr��sb�������
������+�0�0�1��	<�B��r�&�$�?�G���7�D�A�H����'�8�,rMc�v�d}|rOtjd�}t|jddg��}t|jddg��}�n
|dk(ret	tjddgt
j���}t	tjdtgt
j���}n�|dk(rNtjd�}ddlm	}||jddg��}||jddg��}nMtjd�}t|jddg��}t|jddg��}tjd	|�5tt|�||�
�}	ddd�t|t!ddgd
��t!ddgd��|t!dtgd
��t!dtgd��t!ttgd
��t!ddgd��t!dtgd��d�	�}
|dk(rutjd�}ddlm	}t|
j"D�cic]}|||j|
|d�����!c}�}
||jddg��|
d<t%j&	|
�y#1swY��xYwcc}w)Na;<?xml version='1.0' encoding='utf-8'?>
<data xmlns="http://example.com">
<row>
  <a>x</a>
  <b>1</b>
  <c>4.0</c>
  <d>x</d>
  <e>2</e>
  <f>4.0</f>
  <g></g>
  <h>True</h>
  <i>False</i>
</row>
<row>
  <a>y</a>
  <b>2</b>
  <c>5.0</c>
  <d></d>
  <e></e>
  <f></f>
  <g></g>
  <h>False</h>
  <i></i>
</row>
</data>�pyarrow�x�y�pythonr�r)�ArrowExtensionArrayzmode.string_storage)rQ�
dtype_backendr)r*�Int64r�g@�Float64TF�boolean)	r�r�rq�d�er]�g�h�i)�from_pandasr)r8r9r�arrayr�np�object_r�
pandas.arraysrr�pd�option_contextrrrr�columnsr:rs)rQ�string_storager�using_infer_stringrZ�pa�string_array�string_array_narrrrs�cols            r@�test_read_xml_nullable_dtypesr�s^���D�4�
�
 �
 ��
+��5�b�h�h��S�z�6J�K��8����3��+�9N�O��	�8�	#�"�2�8�8�S�#�J�b�j�j�#I�J��%�b�h�h��R�y��
�
�&K�L��	�)�	#�
�
 �
 ��
+��5�*�2�8�8�S�#�J�+?�@��-�b�h�h��T�{�.C�D���
 �
 ��
+��'����#�s��(<�=��*�2�8�8�S�$�K�+@�A��	�	�	�0�.�	A�V��(�4�.��}�U��V�����A��g�.���c�
�)�4� ���B��w�/���b�	��3���R���0���u�
�Y�7�����9�5�
	
��H��	�!�
�
 �
 ��
+��5��$�+�+�
���(����(�3�-�T��)R�S�S�
�
��,�B�H�H�d�D�\�,B�C���
����&�(�+�;V�V��,
s�4J)�$J6�)J3c��d}tjt|��5tdd��ddd�y#1swYyxYw)NzPdtype_backend numpy is invalid, only 'numpy_nullable' and 'pyarrow' are allowed.r6�test�numpy)rrr>s r@�test_invalid_dtype_backendr!+s;��	!��
���z��	-�0���w�/�0�0�0�s�5�>)��
__future__r�iorrr�rr��tarfiler�urllib.errorr�xml.etree.ElementTreer	�zipfiler
r rr8�pandas.compat._optionalr�
pandas.errorsrr
�pandas.util._test_decorators�util�_test_decorators�td�pandasrrrr�pandas._testing�_testingr:�pandas.core.arraysrr�pandas.core.arrays.string_arrowr�pandas.io.commonr�
pandas.io.xmlrr�r�r=r�r�rA�fixturerKrH�
skip_if_norQr^rfry�mark�network�
single_cpur�r�r�r�r�r�r�r��parametrizer�r�r�r�r�r�r�r�r�r�r�rrrr
rrrrrrr#r&r.r7rCrIrMrOrSrYr^rardrlrort�skip_if_installedrwrzr�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�rr!�rMr@�<module>r=s���"���	��"�,���
�>��*�)����
��K�'�"�l�1�"��R�V�V�Q�������(��*
������
�)�!�!�!�!�
������
��Q�1��q�1� � � � � �
�9�9�9�&9�$
9�uI
�=h�j
��Z
#������c�{�#��$����������V�=�2�=�=��3H�I�7�S�T��U��(�,�7�*����������
-���
-�0�".�,/�0/�2/�0�>��������S�	�*�2�+�2�"�������S�	�*�3�+�3�*�����������/���/�&����������M���M�.0�h>�?�>�0�40�.-�&-�,A�
O�
N��������T�
�+�

�,�

� 0�*0�0�(V�O�0O�2�J0�2#0�L'0�T.0�bK�
E�0�
C�B�
B�
7�.
?�
,� ����f�����*�+�6
,�,�,,�-�:;�5�:5�65�&	5��"Q��������S�	�*�
&�+�
&�4�D'2�T����������
���
��
�K�&�R 0�F!0�H!0�H
�
�J/�`,�(M�8<�����������	-���	-�P,�f0rM

Youez - 2016 - github.com/yon3zu
LinuXploit