original_string: public function xml()
      {
          try {
              // Allow XML to be retrieved even if there is no response body
              $xml = new \SimpleXMLElement((string) $this->body ?: '<root />');
          } catch (\Exception $e) {
              throw new RuntimeException('Unable to parse response body into XML: ' . $e->getMessage());
          }
  
          return $xml;
      }
code: public function xml()
      {
          try {
              // Allow XML to be retrieved even if there is no response body
              $xml = new \SimpleXMLElement((string) $this->body ?: '<root />');
          } catch (\Exception $e) {
              throw new RuntimeException('Unable to parse response body into XML: ' . $e->getMessage());
          }
  
          return $xml;
      }
code_tokens: public function xml ( ) { try { // Allow XML to be retrieved even if there is no response body $ xml = new \ SimpleXMLElement ( ( string ) $ this -> body ? : '<root />' ) ; } catch ( \ Exception $ e ) { throw new RuntimeException ( 'Unable to parse response body into XML: ' . $ e -> getMessage ( ) ) ; } return $ xml ; }
docstring: Parse the XML response body and return a SimpleXMLElement
  
  @return \SimpleXMLElement
  @throws RuntimeException if the response body is not in XML format
docstring_tokens: Parse the XML response body and return a SimpleXMLElement