简单教程
提交运行
代码编辑器:
<?php $xmlDoc = new DOMDocument(); $xmlDoc->load("php_xml_note.xml"); $x = $xmlDoc->documentElement; foreach ($x->childNodes AS $item) { echo $item->nodeName , " = ", $item->nodeValue,"<br>"; }
运行结果: