views:

53

answers:

0

From comments

I found the issue :(, Thank you so much for your help, its appreciated, the reason's was because error reporting was switched off and then there was a missing function, causing the script to stop executing in its place

For some reason this Xpath query is not working as expected

foreach($this->Xpath->query('//*[not(*)]') as $OriginalNode)
{
     echo "Node Found: " . $OriginalNode->tagName . "\r\n";
}

This is on a site that contains 209 (a) nodes, and this is the responce from the above block.

Node Found: meta
Node Found: title
Node Found: meta
Node Found: link
Node Found: meta
Node Found: link
Node Found: script
Node Found: style
Node Found: a
/*Snipped link,meta for readability*/

Anyone knows why its not finding the correct nodes!

And example of some code

//...
<li id="menu-item-5955" class="menu-item menu-item-type-post_type menu-item-5955">
    <a href="http://sample.com/?page_id=5896"&gt;Boardwalk Empire</a>
</li> 
<li id="menu-item-6199" class="menu-item menu-item-type-post_type menu-item-6199">
    <a href="http://sample.com/?page_id=6188"&gt;The Defenders 2010</a>
</li>
<li id="menu-item-6203" class="menu-item menu-item-type-post_type menu-item-6203">
    <a href="http://sample.com/?page_id=6170"&gt;Detroit 1-8-7</a>
</li> 
<li id="menu-item-5953" class="menu-item menu-item-type-post_type menu-item-5953">
    <a href="http://sample.com/?page_id=5909"&gt;THE EVƎNT</a>
</li> 
<li id="menu-item-5951" class="menu-item menu-item-type-post_type menu-item-5951">
    <a href="http://sample.com/?page_id=5934"&gt;Chase&lt;/a&gt;
</li>
//...