def dict_to_xml(metadata_dict):
 build = ET.Element('build')
 for (k, v) in metadata_dict.iteritems():
  node = ET.SubElement(build, k)
  node.text = v
 return ET.tostring(build)

def dict_to_xml ( metadata_dict ) : build = ET . Element ( 'build' ) for ( k , v ) in metadata_dict . iteritems ( ) : node = ET . SubElement ( build , k ) node . text = v return ET . tostring ( build )
turn a simple dict of key/value pairs into xml .