note 102442 rejected from simplexml.examples-basic by thiago

From: Date: Mon, 14 Feb 2011 18:48:59 +0000
Subject: note 102442 rejected from simplexml.examples-basic by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176996@lists.php.net to get a copy of this message
Note Submitter: zola at zolaweb dot com ---- If you're trying to use this with the SOAP client, there is apparently an issue with tags such as <soap:envelope> and <soap:body>, it does not like the colons. If this is just a quick grab of a short soap response, a very simple workaround is to replace the offending tag: /* Get the soap response */ $get_soap = $client->__doRequest (your variables here); /* Replace "soap:" with plain "soap" */ $get_soap = str_ireplace('soap:', 'soap', $get_soap); $xml = simplexml_load_string($get_soap); now the object gets properly created.

« previous php.notes (#176996) next »