lxml-wrapper 0.2b
lxml wrapper that simplifies xml generation code.
Latest Version: 0.3.5
This wrapper simplifies your Python xml generation code.
Example XML:
<root attrib="10">
text
<child attrib="">
childtext
</child>
tail
</root>
New way:
E('root', attrib=10).add(
'text',
E('child', attrib=None).add(
'childtext'),
'tail')
Old way:
root = Element('root', attrib=str(10)) # cast to str
root.text = 'text'
child = SubElement(root, 'child', attrib=value or "") # change None to empty string
child.text = 'childtext'
child.tail = 'tail'
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| lxml-wrapper-0.2b.tar.gz (md5) | Source | 2010-03-16 | 2KB | 374 | |
- Author: Mateusz `matee` Pawlik
- Home Page: http://github.com/matee911/lxml-wrapper
- Download URL: http://download.github.com/matee911-lxml-wrapper-5c40170.tar.gz
- Keywords: lxml wrapper
- License: BSD
- Platform: Any
- Requires lxml
- Categories
- Package Index Owner: matee.net
- DOAP record: lxml-wrapper-0.2b.xml
