title: X Path Python Error- 'list' object has no attribute 'xpath'
body: <p>I am trying to do a Web-Crawling project, and I am keep on getting an error code called "'list' object has no attribute 'xpath'"/</p>
  
  <p>This is the code so far:</p>
  
  <pre><code>import requests 
  from lxml import html
  import pandas 
  
  url = "http://www.cnbc.com/"
  response = requests.get(url)
  doc = html.fromstring(response.text)
  
  headlineNode = doc.xpath('//div[@class="headline"]')
  len(headlineNode)
  
  headlines = headlineNode.xpath('/a')
  len(headlines)
  </code></pre>
  
  <p>I want to extraxt the headlines from CNBC Home, but I am keep on getting an error saying</p>
  
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-15-d9f54582133c&gt; in &lt;module&gt;()
  ----&gt; 1 headlines = headlineNode.xpath('/a')
        2 len(headlines)
  
  AttributeError: 'list' object has no attribute 'xpath'
  </code></pre>
  
  <p>Is there anyway to fix this?</p>