if (is_string($string)) {
            $string = phpQuery::newDocumentHTML($string);
        }