--- title: dexml default_block: --- {% block page_meta %} {% endblock %} {% from "macros.j2" import render_excerpt with context %} {% block page_content %}

Dexml is a dead-simple object-XML mapper for Python.

Loosely inspired by Django's ORM, dexml takes the obvious mapping between XML tags and Python objects and lets you capture that as cleanly as possible. You write some simple class definitions to define your models and their attributes, and dexml handles the round-tripping to and from XML.

To get started, check out the unfortunately-still-a-work-in-progress tutorial, the FAQ, or the auto-generated API listing.
Or if you just want to get up and running in a hurry, here's a quick sample of dexml in action:

{% syntax python %} >>> import dexml >>> from dexml import fields >>> >>> class Person(dexml.Model): ... name = fields.String() ... age = fields.Integer(tagname="age") ... >>> p = Person(name="Handsome B. Wonderful",age=36) >>> p.render() '36' {% endsyntax %}
{% for res in resource.node.walk_resources_sorted_by_time()[:2] %} {{ render_excerpt(res) }}
{% endfor %}

Older project news...

{% endblock %}