note 102443 added to simplexml.examples-basic

From: Date: Mon, 14 Feb 2011 18:47:06 +0000
Subject: note 102443 added to simplexml.examples-basic
Groups: php.notes 
Request: Send a blank email to php-notes+get-176995@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/102443 Del: integrated -- https://master.php.net/note/delete/102443/integrated Del: useless -- https://master.php.net/note/delete/102443/useless Del: bad code -- https://master.php.net/note/delete/102443/bad+code Del: spam -- https://master.php.net/note/delete/102443/spam Del: non-english -- https://master.php.net/note/delete/102443/non-english Del: in docs -- https://master.php.net/note/delete/102443/in+docs Del: other reasons-- https://master.php.net/note/delete/102443 Reject -- https://master.php.net/note/reject/102443 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#176995) next »