xmltojson-2.0.3
توضیحات
A Python module and cli tool to quickly convert xml text or files into json
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | xmltojson-2.0.3 |
| نام | xmltojson |
| نسخه کتابخانه | 2.0.3 |
| نگهدارنده | ['John Shanahan'] |
| ایمیل نگهدارنده | ['shanahan.jrs@gmail.com'] |
| نویسنده | John Shanahan |
| ایمیل نویسنده | shanahan.jrs@gmail.com |
| آدرس صفحه اصلی | https://github.com/shanahanjrs/xmltojson |
| آدرس اینترنتی | https://pypi.org/project/xmltojson/ |
| مجوز | Apache-2.0 |
# xmltojson
---
Python library and cli tool for converting XML to JSON
[](https://pepy.tech/badge/xmltojson)
## 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"}'
```
نیازمندی
| مقدار | نام |
|---|---|
| - | xmltodict==0.14.2 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <4.0,>=3.7 | Python |
نحوه نصب
نصب پکیج whl xmltojson-2.0.3:
pip install xmltojson-2.0.3.whl
نصب پکیج tar.gz xmltojson-2.0.3:
pip install xmltojson-2.0.3.tar.gz