开发者

XML to JSON or array? PHP

开发者 https://www.devze.com 2022-12-08 06:18 出处:网络
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? H

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号