def write(self,stream):
from xml.dom.ext import PrettyPrint
import xml.dom.minidom
PrettyPrint(self.document,stream)
stream.write(self.document.toxml("utf-8"))
# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap: