Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I wonder why you want the parser to skip almost your entire http response body, it seems there is no need, it's not containing anything that could be misinterpreted. It even is the data you want to get parsed, that you hideaway in your example for no apparent reason.</p> <p>Look here for some explanation of CDATA: <a href="http://www.w3schools.com/xml/xml_cdata.asp" rel="nofollow">http://www.w3schools.com/xml/xml_cdata.asp</a></p> <p>You could try commenting out the opening and closing CDATA statement like mentioned here: <a href="http://de.selfhtml.org/html/xhtml/unterschiede.htm" rel="nofollow">http://de.selfhtml.org/html/xhtml/unterschiede.htm</a></p> <p>They also state, that the XML parser assumes UTF-8 encoding by default and will refuse parsing if not configured correctly, and that overwriting the exspected type via the response header is not recommended.</p> <p>I prefer to avoid opening and closing php blocks inside block-statements the way you did it, but I'm not quite up-to-date with the latest coding conventions, so I may be wrong on that one.</p> <pre><code>&lt;?php header('Content-type: text/xml'); header ('Cache-Control: no-cache'); header ('Cache-Control: no-store' , false); $response ='&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;properties&gt;'; if ($body != null): foreach ($body as $property): $response .='&lt;property&gt; &lt;lat&gt;'.$property-&gt;lat.'&lt;/lat&gt; &lt;long&gt;'.$property-&gt;long'.&lt;/long&gt; &lt;name&gt;'.$property-&gt;property_name.'&lt;/name&gt; &lt;/property&gt;'; endforeach; endif; $response .='&lt;/properties&gt;'; echo responseText; ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload