Skip to main content

xmltojson


Python library and cli tool for converting XML to JSON

Downloads

Install

$ poetry add xmltojson

$ pip install xmltojson

Usage

Command line:

Converting an XML file and sending the output to STDOUT

$ xmltojson <filename.xml>

Send output to a file

$ xmltojson <filename.xml> -o <new_filename.json>

xmltojson can also read from STDIN

$ echo '<name>John</name>' | xmltojson --stdin

Library:

[1]: import xmltojson
[2]: with open('/path/to/file', 'r') as f:
...:     my_xml = f.read()
[3]: xmltojson.parse(my_xml)
'{"name": "John"}'

Release files for xmltojson 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xmltojson 2.0.3
File Size Uploaded
xmltojson-2.0.3.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xmltojson 2.0.3
File Interpreter ABI Platform
xmltojson-2.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 14.9 kB

Release files / xmltojson-2.0.3.tar.gz

Download URL xmltojson-2.0.3.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
68a0022272adf70b8f2639186172c808e9502cd03c0b851a65e0760561c7801d
BLAKE2b-256 checksum
How to use checksums
c5bd7ff42737e3715eaf0e46714776c2ce75c0d509c7b2e921fa0f94d031a1ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.7 Darwin/23.6.0

Release files / xmltojson-2.0.3-py3-none-any.whl

Download URL xmltojson-2.0.3-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b68519bd14fbf3e28baa630b8c9116b5d3aa8976648f277a78ae3448498889a
BLAKE2b-256 checksum
How to use checksums
e53c80df27969bfbb84425886dd4aaa71875807badd442af65ae7d652592e8ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.7 Darwin/23.6.0

Release history Release notifications | RSS feed

This release

2.0.3 This release

2 release files

2.0.2

2 release files

2.0.1

2 release files

0.2.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page