Finished migrating the "proto" app (which only contained a Person profile edit
form) to the new combined trunk/app layout. Also, moved the form template
from profile.html to profile/edit.html, to follow the "one template per view"
approach (rather than have read-write vs. read-only logic in a single
template).
"""
Utilities for XML generation/parsing.
"""
from xml.sax.saxutils import XMLGenerator
class SimplerXMLGenerator(XMLGenerator):
def addQuickElement(self, name, contents=None, attrs=None):
"Convenience method for adding an element with no children"
if attrs is None: attrs = {}
self.startElement(name, attrs)
if contents is not None:
self.characters(contents)
self.endElement(name)