<?php// here you can directly run xpath queries to debug your tests$Query="//*[local-name()='p']";$DOM=newDOMDocument();$DOM->loadHTMLFile('test.html');$X=newDOMXPath($DOM);print$Query;whois($X->query($Query));functionwhois($nodeList){$return=array();foreach($nodeListas$node){$return[]=($node->tagName.($node->getAttribute('id')?'#'.$node->getAttribute('id'):'').($node->getAttribute('class')?'.'.join('.',split(' ',$node->getAttribute('class'))):''));}print"<pre>";print_r($return);print"</pre>";}?>