function findAndRemove($selector, $idx = null ,$excludes = array())
    {
        if (empty($excludes)) return $this->find($selector,$idx);

        foreach ($excludes as $exclude) {
            foreach ($this->find($exclude) as $node) {
                $node->outertext = '';
            }
        }
        $this->load($this->save());
        return $this->find($selector,$idx);
    }
function findAndRemove($selector, $idx = null ,$excludes = array())
    {
        if (empty($excludes)) return $this->find($selector,$idx);

        foreach ($excludes as $exclude) {
            foreach ($this->find($exclude) as $node) {
                $node->outertext = '';
            }
        }
        $this->load($this->save());
        return $this->find($selector,$idx);
    }
function findAndRemove ( $ selector , $ idx = null , $ excludes = array ( ) ) { if ( empty ( $ excludes ) ) return $ this -> find ( $ selector , $ idx ) ; foreach ( $ excludes as $ exclude ) { foreach ( $ this -> find ( $ exclude ) as $ node ) { $ node -> outertext = '' ; } } $ this -> load ( $ this -> save ( ) ) ; return $ this -> find ( $ selector , $ idx ) ; }
find and remove dom node by css selector
@param string $selector
@param string $idx
@param array $excludes
@return array
find and remove dom node by css selector