public function __construct($html) { $this->dom = XmlParser::getHtmlDocument('<?xml version="1.0" encoding="UTF-8">' . $html); $this->xpath = new DOMXPath($this->dom); }