def csvdata(nodelist):
 data = ''
 for subnode in nodelist:
  if (subnode.nodeType == subnode.ELEMENT_NODE):
   try:
    data = ((data + ',') + subnode.childNodes[0].data)
   except:
    data = (data + ',')
 return (data[1:] + '\n')

def csvdata ( nodelist ) : data = '' for subnode in nodelist : if ( subnode . nodeType == subnode . ELEMENT_NODE ) : try : data = ( ( data + ',' ) + subnode . childNodes [ 0 ] . data ) except : data = ( data + ',' ) return ( data [ 1 : ] + '\n' )
returns the data in the given node as a comma separated string @todo: deprecate .