def XmlToString(content, encoding='utf-8', pretty=False):
 xml_parts = [('<?xml version="1.0" encoding="%s"?>' % encoding)]
 if pretty:
  xml_parts.append('\n')
 _ConstructContentList(xml_parts, content, pretty)
 return ''.join(xml_parts)

def XmlToString ( content , encoding = 'utf-8' , pretty = False ) : xml_parts = [ ( '<?xml version="1.0" encoding="%s"?>' % encoding ) ] if pretty : xml_parts . append ( '\n' ) _ConstructContentList ( xml_parts , content , pretty ) return '' . join ( xml_parts )
writes the xml content to disk .