note 102442 added to simplexml.examples-basic
[email protected] Mon, 14 Feb 2011 10:46:49 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
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