Mercurial > hg > webaudioevaluationtool
comparison php/requestKey.php @ 2753:1ba5ac9d88e7
More PHP work
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 25 Apr 2017 12:06:29 +0100 |
parents | a99c5f008c2d |
children | 8805556c0f42 |
comparison
equal
deleted
inserted
replaced
2752:a99c5f008c2d | 2753:1ba5ac9d88e7 |
---|---|
56 // TODO: | 56 // TODO: |
57 // Generate the XML Base file and save it | 57 // Generate the XML Base file and save it |
58 $doc_struct = new DOMDocument; | 58 $doc_struct = new DOMDocument; |
59 $doc_struct->preserveWhiteSpace = false; | 59 $doc_struct->preserveWhiteSpace = false; |
60 $doc_struct->formatOutput = true; | 60 $doc_struct->formatOutput = true; |
61 $doc_struct->loadXML("<waetresult key=\"".$key."\"/>"); | 61 $doc_struct->loadXML("<waetresult />"); |
62 $doc_struct->documentElement->setAttribute("key", $key); | |
62 // Add the root | 63 // Add the root |
63 if (file_exists($testURL)) { | 64 if (file_exists($testURL)) { |
64 $test_proto_doc = new DOMDocument; | 65 $test_proto_doc = new DOMDocument; |
65 $test_proto_doc->loadXML(file_get_contents($testURL, FILE_TEXT)); | 66 $test_proto_doc->loadXML(file_get_contents($testURL, FILE_TEXT)); |
66 $test_proto = $test_proto_doc->documentElement; | 67 $test_proto = $test_proto_doc->documentElement; |