43 require_once 
'XML/RPC2/Exception.php';
 
   44 require_once 
'XML/RPC2/Backend/Php/Value.php';
 
   45 require_once 
'XML/RPC2/Backend/Php/Value/Struct.php';
 
   80     public static function encode($param, $encoding = 
'iso-8859-1') 
 
   85         $result  = 
'<?xml version="1.0" encoding="' .  $encoding . 
'"?>';
 
   86         $result .= 
'<methodResponse><params><param><value>' . $param->encode() . 
'</value></param></params></methodResponse>';
 
  102     public static function encodeFault($code, $message, $encoding = 
'iso-8859-1')
 
  105         $result  = 
'<?xml version="1.0" encoding="' .  $encoding . 
'"?>';
 
  106         $result .= 
'<methodResponse><fault><value>' . $value->encode() . 
'</value></fault></methodResponse>';
 
  125     public static function decode(SimpleXMLElement $xml) 
 
  127         $faultNode = $xml->xpath(
'/methodResponse/fault');
 
  128         if (count($faultNode) == 1) {
 
  131         $paramValueNode = $xml->xpath(
'/methodResponse/params/param/value');
 
  132         if (count($paramValueNode) == 1) {