xmltojson


Namexmltojson JSON
Version 2.0.3 PyPI version JSON
download
home_pagehttps://github.com/shanahanjrs/xmltojson
SummaryA Python module and cli tool to quickly convert xml text or files into json
upload_time2024-10-20 18:08:17
maintainerJohn Shanahan
docs_urlNone
authorJohn Shanahan
requires_python<4.0,>=3.7
licenseApache-2.0
keywords json xml convert converter library
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # xmltojson

---

Python library and cli tool for converting XML to JSON

[![Downloads](https://static.pepy.tech/personalized-badge/xmltojson?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Installs)](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"}'
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/shanahanjrs/xmltojson",
    "name": "xmltojson",
    "maintainer": "John Shanahan",
    "docs_url": null,
    "requires_python": "<4.0,>=3.7",
    "maintainer_email": "shanahan.jrs@gmail.com",
    "keywords": "json, xml, convert, converter, library",
    "author": "John Shanahan",
    "author_email": "shanahan.jrs@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c5/bd/7ff42737e3715eaf0e46714776c2ce75c0d509c7b2e921fa0f94d031a1ff/xmltojson-2.0.3.tar.gz",
    "platform": null,
    "description": "# xmltojson\n\n---\n\nPython library and cli tool for converting XML to JSON\n\n[![Downloads](https://static.pepy.tech/personalized-badge/xmltojson?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Installs)](https://pepy.tech/badge/xmltojson)\n\n## Install\n\n`$ poetry add xmltojson`\n\n`$ pip install xmltojson`\n\n## Usage\n\n### Command line:\n\n#### Converting an XML file and sending the output to STDOUT\n`$ xmltojson <filename.xml>`\n\n#### Send output to a file\n`$ xmltojson <filename.xml> -o <new_filename.json>`\n\n#### xmltojson can also read from STDIN\n`$ echo '<name>John</name>' | xmltojson --stdin`\n\n### Library:\n```\n[1]: import xmltojson\n[2]: with open('/path/to/file', 'r') as f:\n...:     my_xml = f.read()\n[3]: xmltojson.parse(my_xml)\n'{\"name\": \"John\"}'\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A Python module and cli tool to quickly convert xml text or files into json",
    "version": "2.0.3",
    "project_urls": {
        "Homepage": "https://github.com/shanahanjrs/xmltojson",
        "Repository": "https://github.com/shanahanjrs/xmltojson"
    },
    "split_keywords": [
        "json",
        " xml",
        " convert",
        " converter",
        " library"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e53c80df27969bfbb84425886dd4aaa71875807badd442af65ae7d652592e8ce",
                "md5": "b0df0ffd73e7df9283bf36e34706edb3",
                "sha256": "1b68519bd14fbf3e28baa630b8c9116b5d3aa8976648f277a78ae3448498889a"
            },
            "downloads": -1,
            "filename": "xmltojson-2.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b0df0ffd73e7df9283bf36e34706edb3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.7",
            "size": 7811,
            "upload_time": "2024-10-20T18:08:16",
            "upload_time_iso_8601": "2024-10-20T18:08:16.334187Z",
            "url": "https://files.pythonhosted.org/packages/e5/3c/80df27969bfbb84425886dd4aaa71875807badd442af65ae7d652592e8ce/xmltojson-2.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5bd7ff42737e3715eaf0e46714776c2ce75c0d509c7b2e921fa0f94d031a1ff",
                "md5": "305f3c894d792ed7d7f66d3801e5edd1",
                "sha256": "68a0022272adf70b8f2639186172c808e9502cd03c0b851a65e0760561c7801d"
            },
            "downloads": -1,
            "filename": "xmltojson-2.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "305f3c894d792ed7d7f66d3801e5edd1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.7",
            "size": 7069,
            "upload_time": "2024-10-20T18:08:17",
            "upload_time_iso_8601": "2024-10-20T18:08:17.218879Z",
            "url": "https://files.pythonhosted.org/packages/c5/bd/7ff42737e3715eaf0e46714776c2ce75c0d509c7b2e921fa0f94d031a1ff/xmltojson-2.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-20 18:08:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "shanahanjrs",
    "github_project": "xmltojson",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "xmltojson"
}
        
Elapsed time: 0.37295s