xmlwitch offers Pythonic XML generation through context generators
Project description
xmlwitch offers Pythonic XML generation through context generators in a minimalist implementation with less than 100 lines of code. BSD-licensed.
Usage
import xmlwitch
xml = xmlwitch.Builder(version='1.0', encoding='utf-8')
with xml.feed(xmlns='http://www.w3.org/2005/Atom'):
xml.title('Example Feed')
xml.updated('2003-12-13T18:30:02Z')
with xml.author:
xml.name('John Doe')
xml.id('urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6')
with xml.entry:
xml.title('Atom-Powered Robots Run Amok')
xml.id('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a')
xml.updated('2003-12-13T18:30:02Z')
xml.summary('Some text.')
print(xml)
Setup
$ pip install xmlwitch # or $ easy_install xmlwitch # or $ cd xmlwitch-0.2; python setup.py install
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xmlwitch-0.2.1.tar.gz
(4.5 kB
view details)
File details
Details for the file xmlwitch-0.2.1.tar.gz.
File metadata
- Download URL: xmlwitch-0.2.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9b49c04e96e8110aac1eddc70194cdefcce53885709a282b349ae19ade579fe
|
|
| MD5 |
5c853d0e990f8c58557a91ebd235bd53
|
|
| BLAKE2b-256 |
1021d7cb0f774f9e3255437253b78ed44cdbcf496a1660dab3e96b382417ef54
|