# HG changeset patch # User Nicholas Jillings # Date 1484827880 0 # Node ID a5ec4089d99012bfb5d7197e2fec5a8fe13f989f # Parent 3986de98f04a6d67d9a9aed42e4524f56cd5ad44 Get the root node from the test prototype diff -r 3986de98f04a -r a5ec4089d990 php/requestKey.php --- a/php/requestKey.php Thu Jan 19 12:08:26 2017 +0000 +++ b/php/requestKey.php Thu Jan 19 12:11:20 2017 +0000 @@ -61,8 +61,9 @@ $doc_struct->loadXML(""); // Add the root if (file_exists($testURL)) { - $test_proto = new DOMDocument; - $test_proto->loadXML(file_get_contents($testURL, FILE_TEXT)); + $test_proto_doc = new DOMDocument; + $test_proto_doc->loadXML(file_get_contents($testURL, FILE_TEXT)); + $test_proto = $test_proto_doc->documentElement; $test_proto = $doc_struct->importNode($test_proto, true); $doc_struct->documentElement->appendChild($test_proto); }