https://github.com/francescopaolol/xml2json
XML to JSON Converter
https://github.com/francescopaolol/xml2json
humble-utility json python xml-parser
Last synced: 3 months ago
JSON representation
XML to JSON Converter
- Host: GitHub
- URL: https://github.com/francescopaolol/xml2json
- Owner: FrancescoPaoloL
- License: mit
- Created: 2023-05-18T19:36:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-18T20:00:48.000Z (about 3 years ago)
- Last Synced: 2025-07-12T18:00:30.719Z (12 months ago)
- Topics: humble-utility, json, python, xml-parser
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# XML to JSON Converter
This Python script converts XML data into JSON format. It provides two main functions: parse_element() and convert_xml_to_json().
- parse_element(element): Recursively parses an XML element and creates a dictionary representation.
- convert_xml_to_json(xml_string): Converts an XML string to a JSON string.
To use the script, provide an XML string or file, and run the script to convert XML to JSON. The resulting JSON string will be printed to the console.

## Languages and Tools
## Requirements
```
Just Python 3.6.9
```
## Test coverage
| Name | Stmts | Miss | Branch | BrPart | Cover |
|----------------|-------|------|--------|--------|-------|
| xml2Json.py | 27 | 6 | 12 | 2 | 79% |
| xml2Json_test.py | 15 | 1 | 4 | 1 | 89% |
| TOTAL | 42 | 7 | 16 | 3 | 83% |
## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
## Connect with me