Metadata-Version: 2.1
Name: rapidxmltojson
Version: 0.2.4
Summary: rapidxmltojson
Author-email: Alisher Nazarkhanov <nazarkhanov.alisher.dev@gmail.com>
Project-URL: Homepage, https://github.com/nazarkhanov/rapidxmltojson
Project-URL: Bug Tracker, https://github.com/nazarkhanov/rapidxmltojson/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Markup :: XML
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# rapidxmltojson

`rapidxmltojson` converts xml str to json str

```sh
pip install rapidxmltojson
```
## Examples

```py
>>> import rapidxmltojson
>>> data = rapidxmltojson.parse("""
...     <root a="testa">
...         <child>
...             <item>text 1</item>
...             <item>text 2</item>
...         </child>
...         <example b="testb">
...             example text
...         </example>
...         <test-ns:example xmlns:test-ns="http://test-ns.com/">
...             example text (namespaced)
...         </test-ns:example>
...     </root>
... """)

>>> import json
>>> print(json.dumps(json.loads(data), indent=4))
{
    "root": {
        "@a": "testa",
        "child": {
            "item": [
                "text1",
                "text2"
            ]
        },
        "example": {
            "#text": "exampletext",
            "@b": "testb"
        },
        "test-ns:example": {
            "#text": "exampletext(namespaced)",
            "@xmlns:test-ns": "http://test-ns.com/"
        }
    }
}
```
