src/SimpleDOM.php
protected function _xpath($xpath)
    {
        $use_errors = libxml_use_internal_errors(true);

        $nodes = $this->xpath($xpath);

        libxml_use_internal_errors($use_errors);

        if ($nodes === false) {
            throw new InvalidArgumentException('Invalid XPath expression ' . $xpath);
        }

        return $nodes;
    }
protected function _xpath($xpath)
    {
        $use_errors = libxml_use_internal_errors(true);

        $nodes = $this->xpath($xpath);

        libxml_use_internal_errors($use_errors);

        if ($nodes === false) {
            throw new InvalidArgumentException('Invalid XPath expression ' . $xpath);
        }

        return $nodes;
    }
#@+
@ignore
@param $xpath
@throws InvalidArgumentException
@return \SimpleXMLElement[]