code: def tostring(self):
          
          parser = etree.XMLParser(remove_blank_text=True)
          outputtree = etree.XML(etree.tostring(self.__doc), parser)
          return etree.tostring(outputtree, pretty_print=True)
docs: return a pretty-printed string output for rpc reply