An open API service indexing awesome lists of open source software.

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

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.

![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)

## Languages and Tools

python

## 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


francescopaololezza
francescopaololezza