a
    <bu                     @  s  d Z ddlmZ ddlZddlmZ ddlmZmZm	Z	m
Z
mZ ddlmZ ddlmZmZ ddlmZmZ dd	lmZ dd
lmZ ddlmZ ddlmZmZmZmZmZ ddl m!Z! eed d dG dd dZ"G dd de"Z#G dd de"Z$ddddddddZ%dd d!d"Z&d#d d$d%Z'd&d'd(d)d)d*dd+d,ddd#d-d.d/Z(eddgd0d1eed2 ed d d3d;d&d'd(d)d)d*dd+d,ddd#d-d9d:Z)dS )<z3
:mod:`pandas.io.xml` is a module for reading XML.
    )annotationsN)Sequence)CompressionOptionsFilePath
ReadBufferStorageOptions
XMLParsers)import_optional_dependency)AbstractMethodErrorParserError)deprecate_nonkeyword_argumentsdoc)is_list_like)	DataFrame)_shared_docs)file_exists
get_handleis_fsspec_urlis_urlstringify_path)
TextParserdecompression_optionspath_or_buffer)r   c                   @  sv   e Zd ZdZddddddddd	d
d
ddZddddZddddZddddZddddZddddZ	dS )_XMLFrameParsera  
    Internal subclass to parse XML into DataFrames.

    Parameters
    ----------
    path_or_buffer : a valid JSON str, path object or file-like object
        Any valid string path is acceptable. The string could be a URL. Valid
        URL schemes include http, ftp, s3, and file.

    xpath : str or regex
        The XPath expression to parse required set of nodes for
        migration to `Data Frame`. `etree` supports limited XPath.

    namespacess : dict
        The namespaces defined in XML document (`xmlns:namespace='URI')
        as dicts with key being namespace and value the URI.

    elems_only : bool
        Parse only the child elements at the specified `xpath`.

    attrs_only : bool
        Parse only the attributes at the specified `xpath`.

    names : list
        Column names for Data Frame of parsed XML data.

    encoding : str
        Encoding of xml object or document.

    stylesheet : str or file-like
        URL, file, file-like object, or a raw string containing XSLT,
        `etree` does not support XSLT but retained for consistency.

    {decompression_options}

        .. versionchanged:: 1.4.0 Zstandard support.

    storage_options : dict, optional
        Extra options that make sense for a particular storage connection,
        e.g. host, port, username, password, etc.,

    See also
    --------
    pandas.io.xml._EtreeFrameParser
    pandas.io.xml._LxmlFrameParser

    Notes
    -----
    To subclass this class effectively you must override the following methods:`
        * :func:`parse_data`
        * :func:`_parse_nodes`
        * :func:`_parse_doc`
        * :func:`_validate_names`
        * :func:`_validate_path`


    See each method's respective documentation for details on their
    functionality.
    .FilePath | ReadBuffer[bytes] | ReadBuffer[str]strdict[str, str] | NoneboolSequence[str] | None
str | None5FilePath | ReadBuffer[bytes] | ReadBuffer[str] | Noner   r   )
r   xpath
namespaces
elems_only
attrs_onlynamesencoding
stylesheetcompressionstorage_optionsc                 C  sF   || _ || _|| _|| _|| _|| _|| _|| _d | _|	| _	|
| _
d S N)r   r!   r"   r#   r$   r%   r&   r'   Zis_styler(   r)   )selfr   r!   r"   r#   r$   r%   r&   r'   r(   r)    r,   ]/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/pandas/io/xml.py__init__h   s    z_XMLFrameParser.__init__list[dict[str, str | None]]returnc                 C  s   t | dS )z
        Parse xml data.

        This method will call the other internal methods to
        validate xpath, names, parse and return specific nodes.
        Nr
   r+   r,   r,   r-   
parse_data   s    z_XMLFrameParser.parse_datac                 C  s   t | dS )a=  
        Parse xml nodes.

        This method will parse the children and attributes of elements
        in xpath, conditionally for only elements, only attributes
        or both while optionally renaming node names.

        Raises
        ------
        ValueError
            * If only elements and only attributes are specified.

        Notes
        -----
        Namespace URIs will be removed from return node values.Also,
        elements with missing children or attributes compared to siblings
        will have optional keys filled withi None values.
        Nr2   r3   r,   r,   r-   _parse_nodes   s    z_XMLFrameParser._parse_nodesNonec                 C  s   t | dS )a&  
        Validate xpath.

        This method checks for syntax, evaluation, or empty nodes return.

        Raises
        ------
        SyntaxError
            * If xpah is not supported or issues with namespaces.

        ValueError
            * If xpah does not return any nodes.
        Nr2   r3   r,   r,   r-   _validate_path   s    z_XMLFrameParser._validate_pathc                 C  s   t | dS )z
        Validate names.

        This method will check if names is a list-like and aligns
        with length of parse nodes.

        Raises
        ------
        ValueError
            * If value is not a list and less then length of nodes.
        Nr2   r3   r,   r,   r-   _validate_names   s    z_XMLFrameParser._validate_namesbytesc                 C  s   t | dS )z
        Build tree from path_or_buffer.

        This method will parse XML object into tree
        either from string/bytes or file location.
        Nr2   )r+   raw_docr,   r,   r-   
_parse_doc   s    z_XMLFrameParser._parse_docN)
__name__
__module____qualname____doc__r.   r4   r5   r7   r8   r;   r,   r,   r,   r-   r   *   s   < 
r   c                   @  sV   e Zd ZdZddddZddddZddd	d
ZddddZddddZdS )_EtreeFrameParserz
    Internal class to parse XML into DataFrames with the Python
    standard library XML module: `xml.etree.ElementTree`.
    r/   r0   c                 C  sH   ddl m} | jd urtd|| | j| _|   |   | 	 S )Nr   XMLzBTo use stylesheet, you need lxml installed and selected as parser.)
xml.etree.ElementTreerB   r'   
ValueErrorr;   r   xml_docr7   r8   r5   r+   rB   r,   r,   r-   r4      s    
z_EtreeFrameParser.parse_datac                   s   j jjjd}jr*jr*tdnnjrZjrJfdd|D }qdd |D }n>jrpdd |D }n(jrfdd|D }ndd |D }d	d |D }tt	
d
d |D   fdd|D }jrfdd|D }|S )Nr"   4Either element or attributes can be parsed not both.c              	     sP   g | ]H}i |j r*|j  s*|j|j  ini d d t j|dD qS )c                 S  s&   i | ]\}}||j r|j  nd qS r*   textstrip.0nmchr,   r,   r-   
<dictcomp>   s   =_EtreeFrameParser._parse_nodes.<locals>.<listcomp>.<dictcomp>*)rJ   isspacetagrK   zipr%   findallrM   elr3   r,   r-   
<listcomp>   s   z2_EtreeFrameParser._parse_nodes.<locals>.<listcomp>c                 S  s    g | ]}d d | dD qS )c                 S  s$   i | ]}|j |jr|j nd qS r*   rT   rJ   rK   rM   rO   r,   r,   r-   rP      s   rQ   rR   )rV   rW   r,   r,   r-   rY      s   c                 S  s    g | ]}d d |j  D qS )c                 S  s"   i | ]\}}||r|  nd qS r*   )rK   rM   kvr,   r,   r-   rP          rQ   )attribitemsrW   r,   r,   r-   rY      s   c              	     sV   g | ]N}i |j |jr0|j s0|j|j ini d d t j|dD qS )c                 S  s&   i | ]\}}||j r|j  nd qS r*   rI   rL   r,   r,   r-   rP     s   rQ   rR   )r`   rJ   rS   rT   rK   rU   r%   rV   rW   r3   r,   r-   rY     s   c                 S  sN   g | ]F}i |j |jr0|j s0|j|j ini d d |dD qS )c                 S  s$   i | ]}|j |jr|j nd qS r*   rZ   r[   r,   r,   r-   rP     s   rQ   rR   )r`   rJ   rS   rT   rK   rV   rW   r,   r,   r-   rY     s   c                 S  s   g | ]}d d |  D qS )c                 S  s,   i | ]$\}}d |v r"| d d n||qS }   splitr\   r,   r,   r-   rP   (  r_   rQ   ra   rM   dr,   r,   r-   rY   '  s   c                 S  s   g | ]}|  D ]}|qqS r,   keysrM   ri   r]   r,   r,   r-   rY   +  r_   c                   s   g | ]  fd dD qS )c                   s&   i | ]}||   v r | nd qS r*   rj   rM   r]   ri   r,   r-   rP   ,  r_   rQ   r,   rM   rj   rn   r-   rY   ,  r_   c                   s&   g | ]}d d t  j| D qS )c                 S  s   i | ]\}}||qS r,   r,   rM   rN   r^   r,   r,   r-   rP   /  r_   rQ   rU   r%   valuesrh   r3   r,   r-   rY   /  r_   )rE   rV   r!   r"   r#   r$   rD   r%   listdictfromkeysr+   elemsZdictsr,   rk   r+   r-   r5      s<    


z_EtreeFrameParser._parse_nodesr6   c              	   C  sx   d}zP| j j| j| jd}|du r*t||durR|ddu rR|jdu rRt|W n ttfyr   tdY n0 dS )z
        Notes
        -----
        `etree` supports limited XPath. If user attempts a more complex
        expression syntax error will raise.
        zxpath does not return any nodes. If document uses namespaces denoted with xmlns, be sure to define namespaces and use them in xpath.rG   NrR   zxYou have used an incorrect or unsupported XPath expression for etree library or you used an undeclared namespace prefix.)rE   findr!   r"   rD   r`   KeyErrorSyntaxError)r+   msgrw   r,   r,   r-   r7   3  s    	 z _EtreeFrameParser._validate_pathc                 C  sl   | j rh| jj| j| jd}|r(|dng }t| j rRt| j t|k rhtdnt	t
| j j dd S )NrG   rR   7names does not match length of child elements in xpath. is not a valid type for names)r%   rE   ry   r!   r"   rV   r   lenrD   	TypeErrortyper<   )r+   parentchildrenr,   r,   r-   r8   P  s    
z!_EtreeFrameParser._validate_namesr9   c           	      C  sv   ddl m}m}m} t|| j| j| jd}t|(}|| jd}|||d}W d    n1 s`0    Y  ||	 S )Nr   )	XMLParserparsetostringfilepath_or_bufferr&   r(   r)   r&   parser)
rC   r   r   r   get_data_from_filepathr&   r(   r)   preprocess_datagetroot)	r+   r:   r   r   r   handle_dataxml_datacurr_parserrr,   r,   r-   r;   _  s    
*z_EtreeFrameParser._parse_docN)	r<   r=   r>   r?   r4   r5   r7   r8   r;   r,   r,   r,   r-   r@      s   Tr@   c                   @  sd   e Zd ZdZddddZddddZddd	d
ZddddZddddZddddZ	dS )_LxmlFrameParserz
    Internal class to parse XML into DataFrames with third-party
    full-featured XML library, `lxml`, that supports
    XPath 1.0 and XSLT 1.0.
    r/   r0   c                 C  s`   ddl m} || | j| _| jdurH|| | j| _||  | _|   | 	  | 
 S )z
        Parse xml data.

        This method will call the other internal methods to
        validate xpath, names, optionally parse and run XSLT,
        and parse original or transformed XML and return specific nodes.
        r   rA   N)
lxml.etreerB   r;   r   rE   r'   xsl_doc_transform_docr7   r8   r5   rF   r,   r,   r-   r4   {  s    
z_LxmlFrameParser.parse_datac                   s  j jjjd}jr*jr*tdnnjrZjrJfdd|D }qdd |D }n>jrpdd |D }n(jrfdd|D }ndd |D }jsd	t|d
  d
 v rdd |D }tt	
dd |D   fdd|D }jrfdd|D }|S )NrG   rH   c              	     sP   g | ]H}i |j r*|j  s*|j|j  ini d d t j|dD qS )c                 S  s&   i | ]\}}||j r|j  nd qS r*   rI   rL   r,   r,   r-   rP     s   <_LxmlFrameParser._parse_nodes.<locals>.<listcomp>.<dictcomp>rR   )rJ   rS   rT   rK   rU   r%   r!   rW   r3   r,   r-   rY     s   z1_LxmlFrameParser._parse_nodes.<locals>.<listcomp>c                 S  s    g | ]}d d | dD qS )c                 S  s$   i | ]}|j |jr|j nd qS r*   rZ   r[   r,   r,   r-   rP     s   r   rR   )r!   rW   r,   r,   r-   rY     s   c                 S  s   g | ]
}|j qS r,   )r`   rW   r,   r,   r-   rY     r_   c              	     sV   g | ]N}i |j |jr0|j s0|j|j ini d d t j|dD qS )c                 S  s&   i | ]\}}||j r|j  nd qS r*   rI   rL   r,   r,   r-   rP     s   r   rR   )r`   rJ   rS   rT   rK   rU   r%   r!   rW   r3   r,   r-   rY     s   c                 S  sN   g | ]F}i |j |jr0|j s0|j|j ini d d |dD qS )c                 S  s$   i | ]}|j |jr|j nd qS r*   rZ   r[   r,   r,   r-   rP     s   r   rR   )r`   rJ   rS   rT   rK   r!   rW   r,   r,   r-   rY     s   rc   r   c                 S  s   g | ]}d d |  D qS )c                 S  s,   i | ]$\}}d |v r"| d d n||qS rb   re   r\   r,   r,   r-   rP     r_   r   rg   rh   r,   r,   r-   rY     s   c                 S  s   g | ]}|  D ]}|qqS r,   rj   rl   r,   r,   r-   rY     r_   c                   s   g | ]  fd dD qS )c                   s&   i | ]}||   v r | nd qS r*   rj   rm   rn   r,   r-   rP     r_   r   r,   ro   rj   rn   r-   rY     r_   c                   s&   g | ]}d d t  j| D qS )c                 S  s   i | ]\}}||qS r,   r,   rp   r,   r,   r-   rP     r_   r   rq   rh   r3   r,   r-   rY     r_   )rE   r!   r"   r#   r$   rD   r%   rs   rk   rt   ru   rv   r,   rx   r-   r5     s:    


z_LxmlFrameParser._parse_nodesr6   c                 C  s|   d}| j j| j| jd}| j j| jd | jd}| j j| jd | jd}|g krXt||g krx|g krx|g krxt|d S )Nzxpath does not return any nodes. Be sure row level nodes are in xpath. If document uses namespaces denoted with xmlns, be sure to define namespaces and use them in xpath.rG   z/*z/@*)rE   r!   r"   rD   )r+   r|   rw   r   attrsr,   r,   r-   r7     s    z_LxmlFrameParser._validate_pathc                 C  s^   | j rZ| jj| jd | jd}t| j rDt| j t|k rZtdntt| j j	 ddS )z
        Validate names.

        This method will check if names is a list and aligns with
        length of parse nodes.

        Raises
        ------
        ValueError
            * If value is not a list and less then length of nodes.
        z[1]/*rG   r}   r~   N)
r%   rE   r!   r"   r   r   rD   r   r   r<   )r+   r   r,   r,   r-   r8     s    
z _LxmlFrameParser._validate_namesr9   c           
      C  s   ddl m}m}m}m} t|| j| j| jd}t	|`}|| jd}t
|tjr|| jd u rbtd|| | j|d}	n|||d}	W d    n1 s0    Y  ||	S )Nr   )r   
fromstringr   r   r   r   z2Can not pass encoding None when input is StringIO.r   )r   r   r   r   r   r   r&   r(   r)   r   
isinstanceioStringIOr   getvalueencode)
r+   r:   r   r   r   r   r   r   r   r   r,   r,   r-   r;     s&    

*z_LxmlFrameParser._parse_docc                 C  s(   ddl m} || j}|| j}t|S )z
        Transform original tree using stylesheet.

        This method will transform original xml using XSLT script into
        am ideally flatter xml document for easier parsing and migration
        to Data Frame.
        r   )XSLT)r   r   r   rE   r9   )r+   r   ZtransformerZnew_docr,   r,   r-   r   2  s    

z_LxmlFrameParser._transform_docN)
r<   r=   r>   r?   r4   r5   r7   r8   r;   r   r,   r,   r,   r-   r   t  s   S r   z6FilePath | bytes | ReadBuffer[bytes] | ReadBuffer[str]r   r   r   z1str | bytes | ReadBuffer[bytes] | ReadBuffer[str])r   r&   r(   r)   r1   c                 C  s   t | tst| } t | tr| dst | trHt| sHt| sHt| rt| d|||d,}t	|j
drr|j
 n|j
} W d   n1 s0    Y  | S )aG  
    Extract raw XML data.

    The method accepts three input types:
        1. filepath (string-like)
        2. file-like object (e.g. open file object, StringIO)
        3. XML string or bytes

    This method turns (1) into (2) to simplify the rest of the processing.
    It returns input types (2) and (3) unchanged.
    )z<?xml<r   )r&   r(   r)   readN)r   r9   r   r   
startswithr   r   r   r   hasattrhandler   )r   r&   r(   r)   Z
handle_objr,   r,   r-   r   B  s6    
	
 	r   zio.StringIO | io.BytesIOr0   c                 C  s.   t | trt| } nt | tr*t| } | S )z
    Convert extracted raw data.

    This method will return underlying data of extracted XML content.
    The data either has a `read` attribute (e.g. a file object or a
    StringIO/BytesIO) or is a string or bytes that is an XML document.
    )r   r   r   r   r9   BytesIO)datar,   r,   r-   r   r  s
    	


r   r   c                 K  s|   t t| }dd | D }zBt|fd|i|}| W  d   W S 1 sP0    Y  W n tyv   tdY n0 dS )z
    Convert parsed data to Data Frame.

    This method will bind xml dictionary data of keys and values
    into named columns of Data Frame using the built-in TextParser
    class that build Data Frame and infers specific dtypes.
    c                 S  s   g | ]}t | qS r,   )rs   rr   rh   r,   r,   r-   rY     r_   z"_data_to_frame.<locals>.<listcomp>r%   NzqXML document may be too complex for import. Try to flatten document and use distinct element and attribute names.)nextiterr   r   r   )r   kwargstagsnodestpr,   r,   r-   _data_to_frame  s    	,r   r   r   r   r   r   r   r    )r   r!   r"   r#   r$   r%   r&   r   r'   r(   r)   r1   c                 K  s   |dkrBt ddd}|dur8t| ||||||||	|

}qntdn,|dkrft| ||||||||	|

}ntd| }tf d	|i|S )
a  
    Call internal parsers.

    This method will conditionally call internal parsers:
    LxmlFrameParser and/or EtreeParser.

    Raises
    ------
    ImportError
        * If lxml is not installed if selected as parser.

    ValueError
        * If parser is not lxml or etree.
    lxmlz
lxml.etreeignore)errorsNz7lxml not found, please install or use the etree parser.etreez,Values for parser can only be lxml or etree.r   )r	   r   ImportErrorr@   rD   r4   r   )r   r!   r"   r#   r$   r%   r&   r   r'   r(   r)   r   r   pZ
data_dictsr,   r,   r-   _parse  s@    
r      )versionZallowed_args
stacklevelr)   )r)   r   ./*Futf-8r   inferc                 C  s   t | |||||||||	|
dS )a  
    Read XML document into a ``DataFrame`` object.

    .. versionadded:: 1.3.0

    Parameters
    ----------
    path_or_buffer : str, path object, or file-like object
        String, path object (implementing ``os.PathLike[str]``), or file-like
        object implementing a ``read()`` function. The string can be any valid XML
        string or a path. The string can further be a URL. Valid URL schemes
        include http, ftp, s3, and file.

    xpath : str, optional, default './\*'
        The XPath to parse required set of nodes for migration to DataFrame.
        XPath should return a collection of elements and not a single
        element. Note: The ``etree`` parser supports limited XPath
        expressions. For more complex XPath, use ``lxml`` which requires
        installation.

    namespaces : dict, optional
        The namespaces defined in XML document as dicts with key being
        namespace prefix and value the URI. There is no need to include all
        namespaces in XML, only the ones used in ``xpath`` expression.
        Note: if XML document uses default namespace denoted as
        `xmlns='<URI>'` without a prefix, you must assign any temporary
        namespace prefix such as 'doc' to the URI in order to parse
        underlying nodes and/or attributes. For example, ::

            namespaces = {{"doc": "https://example.com"}}

    elems_only : bool, optional, default False
        Parse only the child elements at the specified ``xpath``. By default,
        all child elements and non-empty text nodes are returned.

    attrs_only :  bool, optional, default False
        Parse only the attributes at the specified ``xpath``.
        By default, all attributes are returned.

    names :  list-like, optional
        Column names for DataFrame of parsed XML data. Use this parameter to
        rename original element names and distinguish same named elements.

    encoding : str, optional, default 'utf-8'
        Encoding of XML document.

    parser : {{'lxml','etree'}}, default 'lxml'
        Parser module to use for retrieval of data. Only 'lxml' and
        'etree' are supported. With 'lxml' more complex XPath searches
        and ability to use XSLT stylesheet are supported.

    stylesheet : str, path object or file-like object
        A URL, file-like object, or a raw string containing an XSLT script.
        This stylesheet should flatten complex, deeply nested XML documents
        for easier parsing. To use this feature you must have ``lxml`` module
        installed and specify 'lxml' as ``parser``. The ``xpath`` must
        reference nodes of transformed XML document generated after XSLT
        transformation and not the original XML document. Only XSLT 1.0
        scripts and not later versions is currently supported.

    {decompression_options}

        .. versionchanged:: 1.4.0 Zstandard support.

    {storage_options}

    Returns
    -------
    df
        A DataFrame.

    See Also
    --------
    read_json : Convert a JSON string to pandas object.
    read_html : Read HTML tables into a list of DataFrame objects.

    Notes
    -----
    This method is best designed to import shallow XML documents in
    following format which is the ideal fit for the two-dimensions of a
    ``DataFrame`` (row by column). ::

            <root>
                <row>
                  <column1>data</column1>
                  <column2>data</column2>
                  <column3>data</column3>
                  ...
               </row>
               <row>
                  ...
               </row>
               ...
            </root>

    As a file format, XML documents can be designed any way including
    layout of elements and attributes as long as it conforms to W3C
    specifications. Therefore, this method is a convenience handler for
    a specific flatter design and not all possible XML structures.

    However, for more complex XML documents, ``stylesheet`` allows you to
    temporarily redesign original document with XSLT (a special purpose
    language) for a flatter version for migration to a DataFrame.

    This function will *always* return a single :class:`DataFrame` or raise
    exceptions due to issues with XML document, ``xpath``, or other
    parameters.

    Examples
    --------
    >>> xml = '''<?xml version='1.0' encoding='utf-8'?>
    ... <data xmlns="http://example.com">
    ...  <row>
    ...    <shape>square</shape>
    ...    <degrees>360</degrees>
    ...    <sides>4.0</sides>
    ...  </row>
    ...  <row>
    ...    <shape>circle</shape>
    ...    <degrees>360</degrees>
    ...    <sides/>
    ...  </row>
    ...  <row>
    ...    <shape>triangle</shape>
    ...    <degrees>180</degrees>
    ...    <sides>3.0</sides>
    ...  </row>
    ... </data>'''

    >>> df = pd.read_xml(xml)
    >>> df
          shape  degrees  sides
    0    square      360    4.0
    1    circle      360    NaN
    2  triangle      180    3.0

    >>> xml = '''<?xml version='1.0' encoding='utf-8'?>
    ... <data>
    ...   <row shape="square" degrees="360" sides="4.0"/>
    ...   <row shape="circle" degrees="360"/>
    ...   <row shape="triangle" degrees="180" sides="3.0"/>
    ... </data>'''

    >>> df = pd.read_xml(xml, xpath=".//row")
    >>> df
          shape  degrees  sides
    0    square      360    4.0
    1    circle      360    NaN
    2  triangle      180    3.0

    >>> xml = '''<?xml version='1.0' encoding='utf-8'?>
    ... <doc:data xmlns:doc="https://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>'''

    >>> df = pd.read_xml(xml,
    ...                  xpath="//doc:row",
    ...                  namespaces={{"doc": "https://example.com"}})
    >>> df
          shape  degrees  sides
    0    square      360    4.0
    1    circle      360    NaN
    2  triangle      180    3.0
    r   r!   r"   r#   r$   r%   r&   r   r'   r(   r)   )r   r   r,   r,   r-   read_xml  s     Ir   )
r   NFFNr   r   Nr   N)*r?   
__future__r   r   typingr   Zpandas._typingr   r   r   r   r   Zpandas.compat._optionalr	   Zpandas.errorsr
   r   Zpandas.util._decoratorsr   r   Zpandas.core.dtypes.commonr   Zpandas.core.framer   Zpandas.core.shared_docsr   Zpandas.io.commonr   r   r   r   r   Zpandas.io.parsersr   r   r@   r   r   r   r   r   r   r,   r,   r,   r-   <module>   sR      + O0$G
          