Use pretty namespace prefixes in output.

This commit is contained in:
Lukasz Langa 2011-05-09 17:02:31 +02:00
parent 32b01d60fc
commit 4230ec2fa9

View File

@ -38,6 +38,10 @@ NAMESPACES = {
"CS": "http://calendarserver.org/ns/"} "CS": "http://calendarserver.org/ns/"}
for short, url in NAMESPACES.iteritems():
ET._namespace_map[url] = short
def _et_indent(elem, level=0): def _et_indent(elem, level=0):
i = "\n" + level * " " i = "\n" + level * " "
if len(elem): if len(elem):