loadHTML(''.$response); $xpath = new DOMXpath($doc); if (!$xpath) die('unable to generate XPath object from server response :('); return $xpath; } ?>