我想提取标题和图片中提到的每个项目在http://rss.cnn.com/rss/edition.rss提要使用PHP,有人能帮我吗?
谢谢
发布于 2012-11-22 02:39:37
你可以试试simplexml_load_string()
例如:
<?php
$string = <<<XML
<?xml version='1.0'?>
<document>
<title>Forty What?</title>
<from>Joe</from>
<to>Jane</to>
<body>
I know that's the answer -- but what's the question?
</body>
</document>
XML;
$xml = simplexml_load_string($string);
var_dump($xml);
?> https://stackoverflow.com/questions/13499570
复制相似问题