title: How to define XPATH value as a variable inside html_nodes in rvest in R
body: <p>while web scraping using R (rvest), I need to define the XPATH value as a variable inside html_nodes. so that I can iterate over many number of XPATHs. When I define XPATH outside, it throws error (For example error comes when xpath = //*[@id=&quot;banner&quot;]). Could you please help.
  My Code:</p>
  <pre><code>xpath &lt;- as.character('//*[@id=&quot;title-overview-widget&quot;]')
        name &lt;- lego %&gt;% 
        html_nodes(xpath) %&gt;%
        html_text()
  Error Message : Error in tokenize(css) : Unexpected character '/' found at position 1
  </code></pre>