original_string: protected function decodeResponse($resp)
      {
          //Setup a SimpleXML Document
          try {
              $xml = @new \SimpleXMLElement($resp);
          } catch (\Exception $e) {
              throw new MalformedResponseException(sprintf("Could not decode XML Response: %s", $e->getMessage()));
          }
  
          //If we get back a OAI-PMH error, throw a OaipmhException
          if (isset($xml->error)) {
              $code = (string) $xml->error['code'];
              $msg  = (string) $xml->error;
  
              throw new OaipmhException($code, $msg);
          }
  
          return $xml;
      }
code: protected function decodeResponse($resp)
      {
          //Setup a SimpleXML Document
          try {
              $xml = @new \SimpleXMLElement($resp);
          } catch (\Exception $e) {
              throw new MalformedResponseException(sprintf("Could not decode XML Response: %s", $e->getMessage()));
          }
  
          //If we get back a OAI-PMH error, throw a OaipmhException
          if (isset($xml->error)) {
              $code = (string) $xml->error['code'];
              $msg  = (string) $xml->error;
  
              throw new OaipmhException($code, $msg);
          }
  
          return $xml;
      }
code_tokens: protected function decodeResponse ( $ resp ) { //Setup a SimpleXML Document try { $ xml = @ new \ SimpleXMLElement ( $ resp ) ; } catch ( \ Exception $ e ) { throw new MalformedResponseException ( sprintf ( "Could not decode XML Response: %s" , $ e -> getMessage ( ) ) ) ; } //If we get back a OAI-PMH error, throw a OaipmhException if ( isset ( $ xml -> error ) ) { $ code = ( string ) $ xml -> error [ 'code' ] ; $ msg = ( string ) $ xml -> error ; throw new OaipmhException ( $ code , $ msg ) ; } return $ xml ; }
docstring: Decode the response into XML
  
  @param  string            $resp The response body from a HTTP request
  @return \SimpleXMLElement An XML document
docstring_tokens: Decode the response into XML