code: def _get_first_aggregate_text(node_list):
      '''
      Extract text from the first occurred DOM aggregate.
      '''
      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(outf _get_first_aggregate_text(node_list):
      '''
      Extract text from the first occurred DOM aggregate.
      '''
      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)
docs: Extract text from the first occurred DOM aggregate.