A simpler XML writer
Project description
XmlElement
A simpler XML writer.
Installation
pip install XmlElement
Test
>>> from XmlElement import XmlElement as X
>>> xml = X.from_string('<test><x/></test>')
>>> xml
XmlElement(test)
Usage
import XmlElement from XmlElement
xml = XmlElement('RootElement', s=[ # root element without attributes
X('Child1', {'name': 'child1', 'testattr': 'Example attribute'}, [ # sub element with an attribute
X('Child2', t='Example text value') # sub-sub element with text value
])
])
print(xml)
print(xml.Child1[0].testattr) # Example attribute
print(xml.Child1[0].Child2[0].text) # Example text value
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
XmlElement-0.1.2.tar.gz
(4.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file XmlElement-0.1.2.tar.gz.
File metadata
- Download URL: XmlElement-0.1.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31655186b9ec5436f3b2b9bba2826836a1a4d163262c09d3d4b280330c2eaa24
|
|
| MD5 |
c019a885ee7861c793bf4739deaf33e6
|
|
| BLAKE2b-256 |
14c0c04073b86660b2e6423f50e71baed593f122fd4cddb686a01eef764d908a
|
File details
Details for the file XmlElement-0.1.2-py3-none-any.whl.
File metadata
- Download URL: XmlElement-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85db6b5ffbb688ba750e2b4a15b1a3190affdfd45b622049feab8df000d7f57a
|
|
| MD5 |
14feb6adb0e5912230d3886cd55f741a
|
|
| BLAKE2b-256 |
dd18621d66c49250be823e5529d786c5f3e212a690b21b8523aeeaf9f0f11825
|