Example #1
0
function getchildnodes($child)
{
    dump_html_tree($child);
    /*foreach ($child[0]->children() as $t) 
      {
        echo "->".$t->tag."\n";
        getchildnodes($t);
      }*/
}
Example #2
0
function dump_html_tree($node, $show_attr=true, $deep=0) {
    $lead = str_repeat('    ', $deep);
    echo $lead.$node->tag;
    if ($show_attr && count($node->attr)>0) {
        echo '(';
        foreach($node->attr as $k=>$v)
            echo "[$k]=>\"".$node->$k.'", ';
        echo ')';
    }
    echo "\n";

    foreach($node->nodes as $c)
        dump_html_tree($c, $show_attr, $deep+1);
}
Example #3
0
 function dump($show_attr = true)
 {
     dump_html_tree($this, $show_attr);
 }
Example #4
0
 function dump($show_attr = true)
 {
     ///TODO Fix Debug function
     dump_html_tree($this, $show_attr);
 }