public function decode($in)
{
$ops_msg = '';
/* determine if we were passed a string or file handle */
if (is_resource($in)) {
# read the file into a string, then process as usual
while (!feof($in)) {
$ops_msg .= fgets($in, 400);
}
} else {
$ops_msg = $in;
}
return $this->XML2PHP($ops_msg);
/* decode and return */
}