functions and class related to generating XML response file. More...
Classes | |
class | ANDS_XML |
class | ANDS_Error_XML |
class | ANDS_Response_XML |
Functions | |
oai_error ($code, $argument= '', $value= '') |
Example usage:
$par_array = array("verb"=>"ListRecords","resumptionToken"=>"9CD1DA87F59C3E960871F4F3C9D093887C17D174"); // Example 1: Error response $error_array[] = oai_error("badVerb","Rubish"); $error_array[] = oai_error("sameVerb"); $e = new ANDS_Error_XML($par_array,$error_array); $e->display(); // Example 2: Normal response without error codes $par_array = array("verb"=>"ListRecords","resumptionToken"=>"9CD1DA87F59C3E960871F4F3C9D093887C17D174"); $test = new ANDS_Response_XML($par_array); $record_node = $test->create_record(); $test->create_header("function: identifier string",gmdate("Y-m-d\TH:i:s\Z"),"collection",$record_node); $test->create_metadata($record_node); $test->display();
oai_error | ( | $ | code, | |
$ | argument = '' , |
|||
$ | value = '' | |||
) |
utility funciton to mapping error codes to readable messages