I'm trying to parse the xml response from a soap service. However, I can't get simplexml_load_string to work! Here is my code:\[code\]//make soap callobjClient = new SoapClient('my-wsdl', array('trace' => true,'exceptions' => 0, 'encoding' => 'UTF-8'));$soapvar = new SoapVar('my-xml', XSD_ANYXML);$objResponse = $objClient->__soapCall($operation, array($soapvar));//process result$str_xml = $objClient->__getLastResponse();$rs_xml = simplexml_load_string($str_xml);\[/code\]...$rs_xml always has just one element with name Envelope.However, if I use *"print var_export($objClient->__getLastResponse(),true);"* to dump the result to my browser, then cut and paste it into my code as a string variable, it work fine! This is what I mean:\[code\]$str_xml = 'my cut and pasted xml';$rs_xml = simplexml_load_string($str_xml);\[/code\]So it seems the problem is somehow related to something $objClient->__getLastResponse() is doing to the string it creates... but I'm at a loss as to what the problem is or how to fix it.