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}}
License
MIT License
Project details
Release history Release notifications | RSS feed
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
tsxml-0.1.0-py3-none-any.whl
(5.3 kB
view details)
File details
Details for the file tsxml-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: tsxml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.8.10 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48692fa0d1faf46fc3a195177ebcfef39500f3c3492f54e61ad437cf6b9b3a62 |
|
MD5 | ddd7e5fa120dc872883da07584880ec2 |
|
BLAKE2b-256 | 65441e800ee355c207346cef355f40af78af0bfa821576724802ad0f698ca046 |