tidy_parser.php
private function walkTree($node)
    {
        if ($node->name === 'a') {
            $this->page->addLink($this->tags()->createTag($node->name, (array) $node->attribute)
                                        ->addContent($this->innerHtml($node)));
        } elseif ($node->name === 'base' and isset($node->attribute['href'])) {
            $this->page->setBase($node->attribute['href']);
        } elseif ($node->name === 'title') {
            $this->page->setTitle($this->tags()->createTag($node->name, (array) $node->attribute)
                                         ->addContent($this->innerHtml($node)));
        } elseif ($node->name === 'frameset') {
            $this->page->setFrames($this->collectFrames($node));
        } elseif ($node->name === 'form') {
            $this->forms[] = $this->walkForm($node, $this->createEmptyForm($node));
        } elseif ($node->name === 'label') {
            $this->labels[] = $this->tags()->createTag($node->name, (array) $node->attribute)
                                           ->addContent($this->innerHtml($node));
        } else {
            $this->walkChildren($node);
        }
    }
private function walkTree($node)
    {
        if ($node->name === 'a') {
            $this->page->addLink($this->tags()->createTag($node->name, (array) $node->attribute)
                                        ->addContent($this->innerHtml($node)));
        } elseif ($node->name === 'base' and isset($node->attribute['href'])) {
            $this->page->setBase($node->attribute['href']);
        } elseif ($node->name === 'title') {
            $this->page->setTitle($this->tags()->createTag($node->name, (array) $node->attribute)
                                         ->addContent($this->innerHtml($node)));
        } elseif ($node->name === 'frameset') {
            $this->page->setFrames($this->collectFrames($node));
        } elseif ($node->name === 'form') {
            $this->forms[] = $this->walkForm($node, $this->createEmptyForm($node));
        } elseif ($node->name === 'label') {
            $this->labels[] = $this->tags()->createTag($node->name, (array) $node->attribute)
                                           ->addContent($this->innerHtml($node));
        } else {
            $this->walkChildren($node);
        }
    }
Visits the given node and all children

@param object $node      Tidy XML node.