Json Encode or Serialize an XML

后端 未结 5 1276
-上瘾入骨i
-上瘾入骨i 2020-12-22 06:01

I have some xml, this is a simple version of it.



  item one
  item two         


        
5条回答
  •  心在旅途
    2020-12-22 06:18

    Here is a class I've found that is able to process XML into array very nicely: http://outlandish.com/blog/xml-to-json/ (backup). Converting to json is a matter of a json_encode() call.

提交回复
热议问题