Skip to main content
This module provides only 2 methods, XMLin and XMLout.

XMLin convert xml to python object, and XMLout python object to xml.

This module is inspired by XML::Simple in CPAN, but some options of XML::Simple are not supported.

Simple example of usage is followings

>>> from pyxml2obj import XMLin, XMLout
>>> xml = '''
... <world>
... <country area="Asia" lang="ja">Japan</country>
... <country area="Europe" lang="fr">France</country>
... <country area="Oceania" lang="en">Australia</country>
... </world>
... '''
>>> world = XMLin(xml)
>>> print world
{u'country': [{u'area': u'Asia', 'content': u'Japan', u'lang': u'ja'},
           {u'area': u'Europe', 'content': u'France', u'lang': u'fr'},
           {u'area': u'Oceania', 'content': u'Australia', u'lang': u'en'}]}
>>> reverse = XMLout(world)
>>> print reverse
<root>
<country area="Asia" lang="ja">Japan</country>
<country area="Europe" lang="fr">France</country>
<country area="Oceania" lang="en">Australia</country>
</root>
In current version, following options are supported

[XMLin] keyattr keeproot forcecontent contentkey noattr forcearray grouptags normalizespace valueattr

[XMLout] keyattr keeproot contentkey noattr rootname xmldecl noescape grouptags valueattr

Metadata

Release files for pyxml2obj 0.1.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyxml2obj 0.1.2.9
File Size Uploaded Provenance
pyxml2obj-0.1.2.9.tar.gz 11.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyxml2obj 0.1.2.9
File Interpreter ABI Platform
pyxml2obj-0.1.2.9-py2.5.egg Legacy Egg format - - Details

Total release size: 38.5 kB

Release files / pyxml2obj-0.1.2.9.tar.gz

Download URL pyxml2obj-0.1.2.9.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ccbcfe9664e0a9d63f577aa6ce2b190faee2e8d3ad3497389ad3e605440e2e88
BLAKE2b-256 checksum
How to use checksums
ca64866f4e96ad4d9826130397ba9d47f5ae8e9dbc873665056cd3da8111086b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyxml2obj-0.1.2.9-py2.5.egg

Download URL pyxml2obj-0.1.2.9-py2.5.egg
Size 27.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
c876630b7dcbb2158d4b259423d10b0d777961023e28bced6674955f444d457b
BLAKE2b-256 checksum
How to use checksums
20733c3c21e351f263deac07ff5d09373ce2704d4e39a81b26ba761727573a7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyxml2obj 0.1.2.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page