dom获取XML的简单例子
<?php
$doc = new DOMDocument;
$doc->load('http://www.dayanmei.com/feed.php');
$topic = $doc->getElementsByTagName('title');
$link = $doc->getElementsByTagName('link');
$da = $doc->getElementsByTagName('pubDate');
for($i=1;$i<=10;$i++){
echo "<a href=\"".$link->item($i)->nodeValue."\" target=\"_blank\">".$topic->item($i)->nodeValue."</a> ".substr($da->item($i)->nodeValue,0,25)."<br />";}
?>
收藏dom获取XML的简单例子到百度搜藏

(142)
(131)
(258)
(230)
(70)
(24)
(6)
(159)
(42)
(24)
(22)
(6)
(2)
(3)
(15)
(11)
(3)