xml_creater.php File Reference

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= '')

Detailed Description

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();
See also:
http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions

Function Documentation

oai_error ( code,
argument = '',
value = '' 
)

utility funciton to mapping error codes to readable messages

 All Classes Files Functions Variables Enumerations
Generated on Thu Jun 16 12:49:22 2011 for OAI PHP by  doxygen 1.6.3