def _get_first_aggregate_text(node_list):
 if (not node_list):
  return ''
 out = []
 for node in node_list[0].childNodes:
  if (node.nodeType == dom.Document.TEXT_NODE):
   out.append(node.nodeValue)
 return '\n'.join(out)

def _get_first_aggregate_text ( node_list ) : if ( not node_list ) : return '' out = [ ] for node in node_list [ 0 ] . childNodes : if ( node . nodeType == dom . Document . TEXT_NODE ) : out . append ( node . nodeValue ) return '\n' . join ( out )
extract text from the first occurred dom aggregate .