About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

linux default iconxmlwitch Publisher's description

A Python implementation of Ruby's XML Builder using the with statement for simplicity

xmlwitch is a reimplementation of Ruby's Builder library written and maintained by Jonas Galvez in the Python language. It uses a very different technique (Python's context processors) but delivers an extremely similar syntax. xmlwitch leverages the with statement which makes it dependent on Python 2.5 and above.

Since the number of patches and other contributions have been greater than what I expected, I've created a mailing-list to help coordinate further improvements (if at all necessary): http://groups.google.com/group/xmlwitch-dev.


xml = builder(version="1.0", encoding="utf-8")
with xml.feed(xmlns='http://www.w3.org/2005/Atom'):
xml.title('Example Feed')
xml.link(None, href='http://example.org/')
with xml.author:
xml.name('John Doe')
with xml.entry:
xml['my:elem']("Hello these are namespaces!", **{'xmlns:my':'http://example.org/ns/', 'my:attr':'what?'})
xml.my__elem("Hello these are namespaces!", xmlns__my='http://example.org/ns/', my__attr='what?')
xml.quoting("< > & ' "", attr="< > & ' "")
xml.title('Atom-Powered Robots Run Amok')
xml.link(None, href='http://example.org/2003/12/13/atom03')
xml.summary('Some text.')
with xml.content(type='xhtml'):
with xml.div(xmlns='http://www.w3.org/1999/xhtml') as div:
xml.label('Some label', for_='some_field')
xml.input(None, type='text', value='')
print xml # str(xml)


System Requirements:

В· Python
Program Release Status:
Program Install Support: Install and Uninstall

Is xmlwitch your software?

Manage your software

Most Popular

linux default icon GDB 7.4
GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it... Read more
linux default icon Coral 0.9.1
Coral is a tool and a development platform to create and transform models and modeling languages.
linux default icon Forum Paid Plus Script 6.1
Forum Paid Pay Per Post Exchange is targeted at forum owners who wish to...
linux default icon sdo 0.6.5
Converts oracle SDO_GEOMETRY objects to WKT and GeoJSON.
linux default icon Get Paid Plus Script 6.1
Get Paid Plus Script

Related Category

» Other (877)
» Tools & Editors (359)
» Web Development (146)