Skip to content

Commit

Permalink
Update AdvancedHtmlDom.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 authored Mar 7, 2018
1 parent cc6e0a9 commit 23f3782
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/AdvancedHtmlDom/AdvancedHtmlDom.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ public function load($html, $is_xml = false)
$this->dom = new \DOMDocument();
if ($is_xml)
{
$this->dom->loadXML(\preg_replace('/xmlns=".*?"/ ', '', $html));
}
else
{
$this->dom->loadHTML($html);
$html = \preg_replace('/xmlns=".*?"/ ', '', $html);
}

$this->dom->loadHTML($html,LIBXML_NOWARNING | LIBXML_NOERROR);
$this->xpath = new \DOMXPath($this->dom);
//$this->root = new AHTMLNode($this->dom->documentElement, $this->doc);
$this->root = $this->at('body');
Expand Down

0 comments on commit 23f3782

Please sign in to comment.