https://github.com/ma-pony/xml2json
xml to json
https://github.com/ma-pony/xml2json
json python xml xml-parser
Last synced: 2 months ago
JSON representation
xml to json
- Host: GitHub
- URL: https://github.com/ma-pony/xml2json
- Owner: ma-pony
- License: mit
- Created: 2022-10-24T13:02:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-20T16:31:15.000Z (over 2 years ago)
- Last Synced: 2025-02-23T02:44:45.020Z (over 1 year ago)
- Topics: json, python, xml, xml-parser
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xml2json
### xml
```xml
1
Photo
https://photo_jpg.jpg
1
Photo
photo_jpg.jpg
2
2
Photo
https://photo_jpg.jpg
1
Photo
photo_jpg.jpg
2
```
### to json
```json
[
{
"Id": {"text": "1"},
"File": [
{
"Active": "true",
"FileType": {"text": "Photo"},
"Src": {"text": "https://photo_jpg.jpg"},
"Rank": {"text": "1"}
},
{
"Active": "true",
"FileType": {"text": "Photo"},
"Src": {"text": "photo_jpg.jpg"},
"Rank": {"text": "2"}
}
]
},
{
"Id": {"text": "2"},
"File": [
{
"Active": "true",
"FileType": {"text": "Photo"},
"Src": {"text": "https://photo_jpg.jpg"},
"Rank": {"text": "1"}
},
{
"Active": "true",
"FileType": {"text": "Photo"},
"Src": {"text": "photo_jpg.jpg"},
"Rank": {"text": "2"}
}
]
}
]
```