echo simplexml object

后端 未结 4 2086
失恋的感觉
失恋的感觉 2021-01-14 21:21

This question has two parts.

Part 1. Yesterday I had some code which would echo the entire content of the XML from an RSS feed. Then I deleted it fr

4条回答
  •  灰色年华
    2021-01-14 22:02

    The simplexml_load_file returns an SimpleXMLElement, so:

    print_r($xml);
    

    will show its minor objects and arrays.

    After your tweaks you can call $xml->asXML("filename.xml"); as @Tim Withers pointed out.

提交回复
热议问题