Metadata-Version: 1.0
Name: magictree
Version: 1.0.0
Summary: Easily create ElementTree with automatic Element factories
Home-page: http://code.google.com/p/pymagictree/
Author: Daren Thomas
Author-email: daren.thomas@gmx.ch
License: UNKNOWN
Description: Creating tree structures like those used for HTML and XML should be dead easy.
        The xml.etree.ElementTree library goes quite far in creating a simple to use library
        for creating and modifying such structures. I'd like to go a step further, building
        on top of ElementTree::
        
        from magictree import html, head, title, body, h1, p
        doc = html(
        head(
        title('Chapter 1: Greeting')),
        body(
        h1('Chapter 1: Greeting'),
        p('Hello, world!')))
        
        from xml.etree import ElementTree as et
        et.dump(doc)
        
        Results in this: (added some whitespace for formatting)
        
        ::
        
        <html>
        <head>
        <title>Chapter 1: Greeting</title>
        </head>
        <body>
        <h1>Chapter 1: Greeting</h1>
        <p>Hello, world!</p>
        </body>
        </html>
        
        This works by replacing this module with a wrapper object in sys.modules that
        creates factory functions for elements based on their name.
        
        I used this page as a basis for the hack: http://stackoverflow.com/questions/2447353/getattr-on-a-module
        
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.5
Classifier: Topic :: Text Processing :: Markup :: XML
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
