why it is not entering to "for loop"
<pre><code>page = requests.get('http://anywebsite/anysearch/') 
tree = html.fromstring(page.content)

lists =  tree.xpath('.//div[@class="normal-view"]')
print "lists"
for i in lists:
    print "1"
    title = i.xpath('.//div[@class="post-entry"/h1//a/@href]//text()')
    print title,"2"
print "3"
</code></pre>

<p>i have given the print("list","1","2","3") statments to check whether the program is entering into the loop or not. </p>

<p>The output i am getting is</p>

<pre><code>lists
3
[Finished in 0.3s]
</code></pre>

<p>The following Python 2 code successfully prints the title of the film under review using the URL you provided.</p>

<pre><code>from lxml import etree
parser = etree.HTMLParser()
tree = etree.parse("http://boxofficeindia.co.in/review-mirzya/", parser)
title = tree.xpath("string(//h1)")
print title
</code></pre>

<p>Executing this gives:</p>

<pre><code>&gt; python ~/test.py
Review: Mirzya
</code></pre>

<p>If this is not what you are looking for, please be more specific in your question.</p>

python python-2.7 xpath python-2.x