original_string: function parse($data) {
          $p = xml_parse($this->parser, $data);
  
          if ($p == 0) {
              // Parse failed
              $errcode = xml_get_error_code($this->parser);
              $errstring = xml_error_string($errcode);
              $lineno = xml_get_current_line_number($this->parser);
              if ($lineno !== false) {
                  $error = array('lineno' => $lineno);
                  $lineno--; // Line numbering starts at 1.
                  while ($lineno > 0) {
                      $data = strstr($data, "\n");
                      $lineno--;
                  }
                  $data .= "\n"; // In case there's only one line (no newline)
                  $line = substr($data, 0, strpos($data, "\n"));
                  $error['code']   = $errcode;
                  $error['string'] = $errstring;
                  $error['line']   = $line;
                  $this->error[] = $error;
              } else {
                  $this->error[] = array('code' => $errcode, 'string' => $errstring);
              }
          }
  
          if (!empty($this->remoteerror)) {
              return false;
          }
  
          if (count($this->cipher) > 0) {
              $this->cipher = array_values($this->cipher);
              $this->payload_encrypted = true;
          }
  
          return (bool)$p;
      }
code: function parse($data) {
          $p = xml_parse($this->parser, $data);
  
          if ($p == 0) {
              // Parse failed
              $errcode = xml_get_error_code($this->parser);
              $errstring = xml_error_string($errcode);
              $lineno = xml_get_current_line_number($this->parser);
              if ($lineno !== false) {
                  $error = array('lineno' => $lineno);
                  $lineno--; // Line numbering starts at 1.
                  while ($lineno > 0) {
                      $data = strstr($data, "\n");
                      $lineno--;
                  }
                  $data .= "\n"; // In case there's only one line (no newline)
                  $line = substr($data, 0, strpos($data, "\n"));
                  $error['code']   = $errcode;
                  $error['string'] = $errstring;
                  $error['line']   = $line;
                  $this->error[] = $error;
              } else {
                  $this->error[] = array('code' => $errcode, 'string' => $errstring);
              }
          }
  
          if (!empty($this->remoteerror)) {
              return false;
          }
  
          if (count($this->cipher) > 0) {
              $this->cipher = array_values($this->cipher);
              $this->payload_encrypted = true;
          }
  
          return (bool)$p;
      }
code_tokens: function parse ( $ data ) { $ p = xml_parse ( $ this -> parser , $ data ) ; if ( $ p == 0 ) { // Parse failed $ errcode = xml_get_error_code ( $ this -> parser ) ; $ errstring = xml_error_string ( $ errcode ) ; $ lineno = xml_get_current_line_number ( $ this -> parser ) ; if ( $ lineno !== false ) { $ error = array ( 'lineno' => $ lineno ) ; $ lineno -- ; // Line numbering starts at 1. while ( $ lineno > 0 ) { $ data = strstr ( $ data , "\n" ) ; $ lineno -- ; } $ data .= "\n" ; // In case there's only one line (no newline) $ line = substr ( $ data , 0 , strpos ( $ data , "\n" ) ) ; $ error [ 'code' ] = $ errcode ; $ error [ 'string' ] = $ errstring ; $ error [ 'line' ] = $ line ; $ this -> error [ ] = $ error ; } else { $ this -> error [ ] = array ( 'code' => $ errcode , 'string' => $ errstring ) ; } } if ( ! empty ( $ this -> remoteerror ) ) { return false ; } if ( count ( $ this -> cipher ) > 0 ) { $ this -> cipher = array_values ( $ this -> cipher ) ; $ this -> payload_encrypted = true ; } return ( bool ) $ p ; }
docstring: Parse a block of XML text
  
  The XML Text will be an XML-RPC request which is wrapped in an XML doc
  with a signature from the sender. This envelope may be encrypted and
  delivered within another XML envelope with a symmetric key. The parser
  should first decrypt this XML, and then place the XML-RPC request into
  the data_object property, and the signature into the signature property.
  
  See the W3C's {@link http://www.w3.org/TR/xmlenc-core/ XML Encryption Syntax and Processing}
  and {@link http://www.w3.org/TR/2001/PR-xmldsig-core-20010820/ XML-Signature Syntax and Processing}
  guidelines for more detail on the XML.
  
  -----XML-Envelope---------------------------------
  |                                                |
  |    Symmetric-key--------------------------     |
  |    |_____________________________________|     |
  |                                                |
  |    Encrypted data-------------------------     |
  |    |                                     |     |
  |    |  -XML-Envelope------------------    |     |
  |    |  |                             |    |     |
  |    |  |  --Signature-------------   |    |     |
  |    |  |  |______________________|   |    |     |
  |    |  |                             |    |     |
  |    |  |  --Signed-Payload--------   |    |     |
  |    |  |  |                      |   |    |     |
  |    |  |  |   XML-RPC Request    |   |    |     |
  |    |  |  |______________________|   |    |     |
  |    |  |                             |    |     |
  |    |  |_____________________________|    |     |
  |    |_____________________________________|     |
  |                                                |
  |________________________________________________|
  
  @param   string  $data   The XML that you want to parse
  @return  bool            True on success - false on failure
docstring_tokens: Parse a block of XML text