You are here

function soap_parser::character_data in Salesforce Suite 5

Same name in this branch
  1. 5 includes/nusoap.php \soap_parser::character_data()
  2. 5 includes/nusoap.orig.php \soap_parser::character_data()
Same name and namespace in other branches
  1. 5.2 includes/nusoap.php \soap_parser::character_data()
  2. 5.2 includes/nusoap.orig.php \soap_parser::character_data()

* element content handler * *

Parameters

resource $parser XML parser object: * @param string $data element content * @access private

File

includes/nusoap.orig.php, line 6182

Class

soap_parser
soap_parser class parses SOAP XML messages into native PHP values

Code

function character_data($parser, $data) {
  $pos = $this->depth_array[$this->depth];
  if ($this->xml_encoding == 'UTF-8') {

    // TODO: add an option to disable this for folks who want
    // raw UTF-8 that, e.g., might not map to iso-8859-1
    // TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1");
    if ($this->decode_utf8) {
      $data = utf8_decode($data);
    }
  }
  $this->message[$pos]['cdata'] .= $data;

  // for doclit
  if ($this->status == 'header') {
    $this->responseHeaders .= $data;
  }
  else {
    $this->document .= $data;
  }
}