src/Peru/Sunat/HtmlParser.php
public function parse($html)
    {
        $xp = $this->getXpathFromHtml($html);
        $table = $xp->query('./html/body/table[1]');

        if (0 == $table->length) {
            return false;
        }

        $nodes = $table->item(0)->childNodes;
        $dic = $this->getKeyValues($nodes, $xp);

        return $dic;
    }
public function parse($html)
    {
        $xp = $this->getXpathFromHtml($html);
        $table = $xp->query('./html/body/table[1]');

        if (0 == $table->length) {
            return false;
        }

        $nodes = $table->item(0)->childNodes;
        $dic = $this->getKeyValues($nodes, $xp);

        return $dic;
    }
public function parse ( $ html ) { $ xp = $ this -> getXpathFromHtml ( $ html ) ; $ table = $ xp -> query ( './html/body/table[1]' ) ; if ( 0 == $ table -> length ) { return false ; } $ nodes = $ table -> item ( 0 ) -> childNodes ; $ dic = $ this -> getKeyValues ( $ nodes , $ xp ) ; return $ dic ; }
Parse html to dictionary.

@param $html

@return array|false
Parse html to dictionary .