title: How to extract XML data using XPath with Selenium Webdriver
body: <p>I'm using Selenium Webdriver <code>(ver 2.31.2.0)</code> (.Net) and I'm trying to extract an element (XML) which is returning from the `driver.PageSource'.</p>
  
  <p>My Question: How to get the list of items using the below xpath.
  I able to play in FF using XPATH addons but the same code does not work in Selenium Webdriver</p>
  
  <p>any help?</p>
  
  <p>Here is my code in Selenium Webdriver:</p>
  
  <pre><code>var driver = new FirefoxDriver();
  driver.Navigate().GoToUrl("http://website_name/languages.xml");
  string _page_source = driver.PageSource;
  ReadOnlyCollection&lt;IWebElement&gt; webElements = _page_source.FindElementsByXPath("//response//results//items/vList");
  </code></pre>
  
  <p>my xml looks like this:</p>
  
  <pre><code>&lt;response xmlns="http://schemas.datacontract.org/2004/07/myproj.cnn.com"&gt;
  xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;meta&gt;
  
      &lt;/meta&gt;
      &lt;results i:type="vList"&gt;
          &lt;name&gt;Language&lt;/name&gt;
          &lt;queryValue&gt;language&lt;/queryValue&gt;
          &lt;displayOrder&gt;0&lt;/displayOrder&gt;
          &lt;items&gt;
              &lt;vList&gt;
                  &lt;name&gt;English&lt;/name&gt;
                  &lt;displayName&gt;English&lt;/displayName&gt;
                  &lt;displayOrder&gt;0&lt;/displayOrder&gt;
                  &lt;items /&gt;
              &lt;/vList&gt;
              &lt;vList&gt;
                  &lt;name&gt;Swedish&lt;/name&gt;
                  &lt;displayName&gt;Swedish&lt;/displayName&gt;
                  &lt;displayOrder&gt;1&lt;/displayOrder&gt;
                  &lt;items /&gt;
              &lt;/vList&gt;
          &lt;/items&gt;
      &lt;/results&gt;
  &lt;/response&gt;
  </code></pre>