Metadata-Version: 1.1
Name: lxml-wrapper
Version: 0.3.6
Summary: lxml wrapper that simplifies xml generation code.
Home-page: http://github.com/matee911/lxml-wrapper
Author: Mateusz `matee` Pawlik
Author-email: matee@matee.net
License: BSD
Download-URL: https://github.com/matee911/lxml-wrapper/archive/0.3.6.tar.gz
Description: 
              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'
        
        
              Now with .add_if and .add_for methods:
        
              E('root').add_if(1==1, E('child')) -> <root><child /></root>
        
              E('root').add_if(1==0, E('child')) -> <root/>
        
              E('root').add_for([1,2], lambda item: E('item', attr=item)) -> <root><item attr="1"/><item attr="2"/></root>
        
              
Keywords: lxml wrapper dsl
Platform: Any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires: lxml
