title: Select li elements from ul with xpath
body: <p>I'm starting with <code>XPATH</code> from <code>lxml</code> on <code>Python3</code> and I'm unable to get the right sintaxis to select all <code>li</code> elements with content of a <code>ul</code>. I'm trying with this structure:</p>
  
  <pre><code>&lt;body&gt;
   &lt;div&gt; ..... &lt;/div&gt;
   &lt;div&gt; ..... &lt;/div&gt;
   &lt;div id="div-A"&gt;
    &lt;div id="subdiv-1"&gt;
     &lt;form&gt; ... &lt;/form&gt;
     &lt;div&gt; ..... &lt;/div&gt;
     &lt;div&gt; ..... &lt;/div&gt;
     &lt;ul&gt;
      &lt;li&gt;
       &lt;div id="div-1"&gt;
        &lt;div&gt; ..... &lt;/div&gt;
        &lt;div&gt; ..... &lt;/div&gt;
        &lt;div id="subdiv-1"&gt;
         &lt;a class="name"&gt;
          &lt;span&gt;
            ....text1....
          &lt;/span&gt;
         &lt;/a&gt;
        &lt;/div&gt;
        &lt;div id="subdiv-2"&gt;
         &lt;div class="class-1"&gt;
          &lt;div class="subClass-1"&gt;
           &lt;div&gt; ....text2.... &lt;/div&gt;
          &lt;/div&gt;
          &lt;span class="subClass-2"&gt;
           ....text3....
          &lt;/span&gt;
         &lt;/div&gt;
        &lt;/div&gt;
       &lt;/div&gt;
      &lt;/li&gt;
      ... x23...
     &lt;/ul&gt;
    &lt;/div&gt;
   &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>My goal it's to be able to get <strong>text1</strong>, <strong>text2</strong> and <strong>text3</strong>.</p>
  
  <p>So first, I try to get all <code>li</code> elements with their content:</p>
  
  <pre><code>content = html_response.content
  fixed_content = fromstring(content)  # parse the HTML and correct malformed HTML
  items = fixed_content.xpath('//ul/li/*')
  </code></pre>
  
  <p>And pass <code>items</code> to a function with a for loop to iterate over the 23 <code>li</code> elements. Now I try to get the texts, so:</p>
  
  <pre><code>for item in items:
   text1 = item.xpath('/div[@id="div-1"]/div[@id="subdiv-1"]/a[@class="name"]/span').text_content()
   text2 = item.xpath('/div[@id="div-1"]/div[@id="subdiv-2"]/div[@class="class-1"]/div[@class="subClass-1"]/div').text_content()
   text3 = item.xpath('/div[@id="div-1"]/div[@id="subdiv-2"]/div[@class="class-1"]/div[@class="subClass-2"]/span[@class="subClass-2"]').text_content()
  </code></pre>
  
  <p>But I get on all cases an empty result with no content. What I'm doing wrong?</p>
  
  <p>Regards.</p>