Parse TestStand XML to Python dictionary
Project description
tsxml
TestStand XML Parser for Python. Converts the XML string of variable exported using 'GetXML(0,0)' function in TestStand to Python dictionary.
Install
Install using pip
pip install tsxml
Supports Python >= 3.8
Usage
import tsxml
input_xml = """
<?TS version="2019 (19.0.0.170)"?>
<Prop Name='MyContainer' Type='Obj' Flags='0x4'>
<Prop Name='MyNumber' Type='Number' Flags='0x0'>
<Value>5</Value>
</Prop>
<Prop Name='MyString' Type='String' Flags='0x0'>
<Value>xTLDR.com</Value>
</Prop>
<Prop Name='MyBoolean' Type='Boolean' Flags='0x0'>
<Value>True</Value>
</Prop>
</Prop>
"""
result = tsxml.parse(input_xml)
# result = {'MyContainer': {'MyNumber': 5.0, 'MyString': 'xTLDR.com', 'MyBoolean': True}}
Source
Setup Source Code
uv python install 3.8.10
pipx install tox==4.9.0
poetry install
tox
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
tsxml-0.2.0-py3-none-any.whl
(5.4 kB
view details)
File details
Details for the file tsxml-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tsxml-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.8.10 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
390ed91143f3d221596e41c9598f662fd0ff0dd499d83fc73bdff87a5ee11fde
|
|
| MD5 |
6a28213d6ffb69c9549f8c6e0c329b91
|
|
| BLAKE2b-256 |
5d85ca1cd84ff8e7ab72c5055644066f00a4a7bb605d669520b98e2519167eca
|