note 102442 added to simplexml.examples-basic

From: Date: Mon, 14 Feb 2011 18:46:49 +0000
Subject: note 102442 added to simplexml.examples-basic
Groups: php.notes 
Request: Send a blank email to php-notes+get-176994@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 184.13.7.156 ---- Manual Page -- http://www.php.net/manual/en/simplexml.examples-basic.php Edit -- https://master.php.net/note/edit/102442 Del: integrated -- https://master.php.net/note/delete/102442/integrated Del: useless -- https://master.php.net/note/delete/102442/useless Del: bad code -- https://master.php.net/note/delete/102442/bad+code Del: spam -- https://master.php.net/note/delete/102442/spam Del: non-english -- https://master.php.net/note/delete/102442/non-english Del: in docs -- https://master.php.net/note/delete/102442/in+docs Del: other reasons-- https://master.php.net/note/delete/102442 Reject -- https://master.php.net/note/reject/102442 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#176994) next »