<?php $xml = simplexml_load_file(‘example.xml’); //创建SimpleXML对象 var_dump($xml); //输出XML ?> <?php $xml = simplexml_load_file(‘example.xml’); //读取XML文件 foreach($xml->d