When you converting XML to JSON by PHP some tags convert to blank, Try PHP code
1 2 3 4 5 6 7 8 9 10 |
header("Content-type: text/json"); $url="http://localhost/xmldata/test.xml"; $xmlstring = file_get_contents($url, true); $xml = simplexml_load_string($xmlstring, "SimpleXMLElement", LIBXML_NOCDATA); $json = json_encode($xml); echo $json; |
More Stories
CPU & Memory usage in PHP
Install PHP mcrypt extension on Ubuntu
Text to speech