如何从php中的rss中检索href

时间:2016-01-11 20:14:18

标签: php rss

<?xml version='1.0' encoding='UTF-8'?>
<category term="Search"/>
<category term="Design"/>
<title>Ijazilla</title>
<link rel='next' type='application/atom+xml' href='http://www.ijazialla.blogspot.com'/>
?>

我的PHP代码是:

  <?php xml=simplexml_load_file("xmlfile.xml");
    foreach($xml->children() as $child){

       echo $child->title;
       echo $child->category[term];
       echo $child->link[href];

    } ?>

如何检索&#34;链接href&#34;和两个&#34;类别术语&#34;?

0 个答案:

没有答案