Fixes an issue where the organization home page would throw a 505 when no projects...
[Melange.git] / app / django / utils / xmlutils.py
bloba1eb5fb753917b635268ed8ed22f9e4a148f7c40
1 """
2 Utilities for XML generation/parsing.
3 """
5 from xml.sax.saxutils import XMLGenerator
7 class SimplerXMLGenerator(XMLGenerator):
8 def addQuickElement(self, name, contents=None, attrs=None):
9 "Convenience method for adding an element with no children"
10 if attrs is None: attrs = {}
11 self.startElement(name, attrs)
12 if contents is not None:
13 self.characters(contents)
14 self.endElement(name)