Consider this simple markup (list):
<html>
<body>
<div class=mz-block" id="block-1">
<ul>
<li class="branch">
<u>MENU 1</u>
<ul>
<li class="leaf">foo1</li>
<li class="leaf">foo2</li>
<li class="branch">foo3
<ul>
<li class="leaf">foo4</li>
<li class="leaf">foo5</li>
<li class="branch">foo6
<ul>
<li class="leaf">foo7</li>
</ul>
</li>
</ul>
</li>
<li class="leaf">foo8</li>
</ul>
</li>
</ul>
</div>
<div class=mz-block" id="block-2">
...
</div>
<div class=mz-block" id="block-3">
...
</div>
</body>
</html>
Let's sat that i want to print ONLY the 4th <li> element of 2nd "descendant line".. so:
<li class="leaf">foo8</li>
In jQuery i will do like this:
console.log( $('div.mz-block').eq(0).find('> ul > li > ul > li').eq(3).html() );
And it works fine...
But, if i try the same in QueryPath, like this:
print html5qp($HTMLdoc,'div.mz-block')->eq(0)->find('> ul > li > ul > li')->eq(3)->html5();
i get this (wrong) element
<li class="leaf">foo4</li>
Which is (obviously)
NOT a "direct" descendant ....
Finally, i tried with an XPath expression, so:
print $HTMLdoc->xpath('/html/body/div[@class="mz-block"]')->eq(0)->xpath('ul/li/ul/li')->eq(3)->html5();
And it works properly... output:
<li class="leaf">foo8</li>
...........
Any ideas???
Is there a way to report this "problem" directly to the Author?