dom获取XML的简单例子
[php] load('http://www.dayanmei.com/feed.php'); $topic = $doc->getElementsByTagName('title'); $link = $doc->getElementsByTagName('link'); $da = $doc->getElementsByTagName('pubDate'); for($i=1;$iitem($i)->nodeValue."" target="_blank">".$topic->item($i)->nodeValue." ".substr($da->item($i)->nodeValue,0,25)."
";} ?> [/php]