php_parser.php
public function startElement($name, $attributes)
    {
        $factory = new SimpleTagBuilder();
        $tag     = $factory->createTag($name, $attributes);
        if (! $tag) {
            return true;
        }
        if ($tag->getTagName() === 'label') {
            $this->acceptLabelStart($tag);
            $this->openTag($tag);

            return true;
        }
        if ($tag->getTagName() === 'form') {
            $this->acceptFormStart($tag);

            return true;
        }
        if ($tag->getTagName() === 'frameset') {
            $this->acceptFramesetStart($tag);

            return true;
        }
        if ($tag->getTagName() === 'frame') {
            $this->acceptFrame($tag);

            return true;
        }
        if ($tag->isPrivateContent() && ! isset($this->private_content_tag)) {
            $this->private_content_tag = $tag;
        }
        if ($tag->expectEndTag()) {
            $this->openTag($tag);

            return true;
        }
        $this->acceptTag($tag);

        return true;
    }
public function startElement($name, $attributes)
    {
        $factory = new SimpleTagBuilder();
        $tag     = $factory->createTag($name, $attributes);
        if (! $tag) {
            return true;
        }
        if ($tag->getTagName() === 'label') {
            $this->acceptLabelStart($tag);
            $this->openTag($tag);

            return true;
        }
        if ($tag->getTagName() === 'form') {
            $this->acceptFormStart($tag);

            return true;
        }
        if ($tag->getTagName() === 'frameset') {
            $this->acceptFramesetStart($tag);

            return true;
        }
        if ($tag->getTagName() === 'frame') {
            $this->acceptFrame($tag);

            return true;
        }
        if ($tag->isPrivateContent() && ! isset($this->private_content_tag)) {
            $this->private_content_tag = $tag;
        }
        if ($tag->expectEndTag()) {
            $this->openTag($tag);

            return true;
        }
        $this->acceptTag($tag);

        return true;
    }
Start of element event. Opens a new tag.

@param string $name         Element name.
@param hash $attributes     Attributes without content are marked as true.

@return bool             False on parse error.