protected function start($parser, $tag, $attributes)
    {
        //Set the tag as lower case, for consistency
        $tag = strtolower($tag);

        //Update the current path
        $this->currentPath .= $tag.'/';

        $this->fireCurrentAttributesCallbacks($attributes);

        //Go through each callback and ensure that path data has been
        //started for it
        foreach ($this->callbacks as $path => $callbacks) {
            if ($path === $this->currentPath) {
                $this->pathData[$this->currentPath] = '';
            }
        }

        //Generate the tag, with attributes. Attribute names are also lower
        //cased, for consistency
        $data = '<'.$tag;
        foreach ($attributes as $key => $val) {
            $options = ENT_QUOTES;
            if (defined('ENT_XML1')) {
                $options |= ENT_XML1;
            }

            $val   = htmlentities($val, $options, "UTF-8");
            $data .= ' '.strtolower($key).'="'.$val.'"';

            if (stripos($key, 'xmlns:') !== false) {
                $key = strtolower($key);
                $key = str_replace('xmlns:', '', $key);
                $this->namespaces[strtolower($key)] = $val;
            }
        }
        $data .= '>';

        //Add the data to the path data required
        $this->addData($parser, $data);

        return $parser;
    }
protected function start($parser, $tag, $attributes)
    {
        //Set the tag as lower case, for consistency
        $tag = strtolower($tag);

        //Update the current path
        $this->currentPath .= $tag.'/';

        $this->fireCurrentAttributesCallbacks($attributes);

        //Go through each callback and ensure that path data has been
        //started for it
        foreach ($this->callbacks as $path => $callbacks) {
            if ($path === $this->currentPath) {
                $this->pathData[$this->currentPath] = '';
            }
        }

        //Generate the tag, with attributes. Attribute names are also lower
        //cased, for consistency
        $data = '<'.$tag;
        foreach ($attributes as $key => $val) {
            $options = ENT_QUOTES;
            if (defined('ENT_XML1')) {
                $options |= ENT_XML1;
            }

            $val   = htmlentities($val, $options, "UTF-8");
            $data .= ' '.strtolower($key).'="'.$val.'"';

            if (stripos($key, 'xmlns:') !== false) {
                $key = strtolower($key);
                $key = str_replace('xmlns:', '', $key);
                $this->namespaces[strtolower($key)] = $val;
            }
        }
        $data .= '>';

        //Add the data to the path data required
        $this->addData($parser, $data);

        return $parser;
    }
protected function start ( $ parser , $ tag , $ attributes ) { //Set the tag as lower case, for consistency $ tag = strtolower ( $ tag ) ; //Update the current path $ this -> currentPath .= $ tag . '/' ; $ this -> fireCurrentAttributesCallbacks ( $ attributes ) ; //Go through each callback and ensure that path data has been //started for it foreach ( $ this -> callbacks as $ path => $ callbacks ) { if ( $ path === $ this -> currentPath ) { $ this -> pathData [ $ this -> currentPath ] = '' ; } } //Generate the tag, with attributes. Attribute names are also lower //cased, for consistency $ data = '<' . $ tag ; foreach ( $ attributes as $ key => $ val ) { $ options = ENT_QUOTES ; if ( defined ( 'ENT_XML1' ) ) { $ options |= ENT_XML1 ; } $ val = htmlentities ( $ val , $ options , "UTF-8" ) ; $ data .= ' ' . strtolower ( $ key ) . '="' . $ val . '"' ; if ( stripos ( $ key , 'xmlns:' ) !== false ) { $ key = strtolower ( $ key ) ; $ key = str_replace ( 'xmlns:' , '' , $ key ) ; $ this -> namespaces [ strtolower ( $ key ) ] = $ val ; } } $ data .= '>' ; //Add the data to the path data required $ this -> addData ( $ parser , $ data ) ; return $ parser ; }
Parses the start tag

@param resource $parser     The XML parser
@param string   $tag        The tag that's being started
@param array    $attributes The attributes on this tag

@return NULL
Parses the start tag