XML to JSON or array? PHP
I was thinking, it might be able to use and process XML data if i can run the XML thr开发者_如何学Goough a func to validate it (against a schema) then convert the XML to json for easy object access? How can i convert XML to JSON easily?
$json = json_encode(simplexml_load_string($xmlString));
$array = json_decode($json,true);
http://www.ibm.com/developerworks/xml/library/x-xml2jsonphp/
精彩评论