开发者

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/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜