title: Scrape BBC Stock Market Data using rvest package in R
body: <p>I am trying to scrape the below webpage using the rvest R package.
  <a href="http://www.bbc.co.uk/news/business/market_data/stockmarket/default.stm" rel="nofollow">BBC Stock Market Data</a></p>
  
  <p>I am looking to retrieve the Europe/Africa table in a dataframe.</p>
  
  <p>My code at the moment is:</p>
  
  <pre><code>stockmarket &lt;- "http://www.bbc.co.uk/news/business/market_data/stockmarket/default.stm"
  stockmarket_html &lt;- read_html(stockmarket)
  stockmarket_perf &lt;- html_nodes(stockmarket_html, xpath = '//*[@id="marketdata_v4"]/table/tbody/tr[1]/td/table[6]/tbody')
  stockmarket_table &lt;- html_table(stockmarket_perf)
  </code></pre>
  
  <p>but it is not working.
  More specifically, when I examine the stockmarket_html document it seems that it is not an HTML but an XML pointer which I:</p>
  
  <ol>
  <li>Don't know what it is</li>
  <li>Don't know how to convert into an R object</li>
  </ol>
  
  <p>Any help or direction would be greatly appreciated.</p>